2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

isc_interval_t conversion

This commit is contained in:
Bob Halley
1998-10-23 23:00:40 +00:00
parent 5cc3e0c38f
commit db1e643c60
3 changed files with 22 additions and 27 deletions

View File

@@ -54,7 +54,8 @@ main(int argc, char *argv[]) {
unsigned int workers;
isc_timermgr_t timgr;
isc_timer_t ti1, ti2;
struct isc_time absolute, interval;
struct isc_time absolute;
struct isc_interval interval;
if (argc > 1)
workers = atoi(argv[1]);
@@ -79,14 +80,14 @@ main(int argc, char *argv[]) {
timgr = NULL;
INSIST(isc_timermgr_create(mctx, &timgr) == ISC_R_SUCCESS);
ti1 = NULL;
absolute.seconds = 0;
absolute.nanoseconds = 0;
interval.seconds = 1;
interval.nanoseconds = 0;
isc_time_settoepoch(&absolute);
isc_interval_set(&interval, 1, 0);
INSIST(isc_timer_create(timgr, isc_timertype_ticker,
&absolute, &interval,
t1, my_tick, "foo", &ti1) == ISC_R_SUCCESS);
ti2 = NULL;
isc_time_settoepoch(&absolute);
isc_interval_set(&interval, 1, 0);
INSIST(isc_timer_create(timgr, isc_timertype_ticker,
&absolute, &interval,
t2, my_tick, "bar", &ti2) == ISC_R_SUCCESS);