Refactor isc_timer_create() to just create timer

The isc_timer_create() function was a bit conflated.  It could have been
used to create a timer and start it at the same time.  As there was a
single place where this was done before (see the previous commit for
nta.c), this was cleaned up and the isc_timer_create() function was
changed to only create new timer.
This commit is contained in:
Ondřej Surý
2022-03-11 12:09:35 +01:00
committed by Evan Hunt
parent 514053f244
commit c259cecc90
12 changed files with 64 additions and 208 deletions

View File

@@ -1400,8 +1400,9 @@ be triggered at that time.
* 'arg' as its argument in task 'task'.
*/
isc_timer_t *timer = NULL;
result = isc_timer_create(timermgr, isc_timertype_once, NULL,
interval, task, timeout, arg, &timer);
result = isc_timer_create(timermgr, task, timeout, arg, &timer);
result = isc_timer_reset(timermgr, isc_timertype_once, NULL,
interval, false);
An event can also be explicitly triggered via `isc_task_send()`.