diff --git a/lib/isc/include/isc/timer.h b/lib/isc/include/isc/timer.h index b86d74e4aa..78a0a583df 100644 --- a/lib/isc/include/isc/timer.h +++ b/lib/isc/include/isc/timer.h @@ -29,9 +29,6 @@ * They are used to implement both (possibly expiring) idle timers and * 'one-shot' timers. * - *\li 'limited' timers generate a periodic tick event until they reach - * their lifetime when they generate a life timeout event. - * *\li 'inactive' timers generate no events. * * Timers can change type. It is typical to create a timer as @@ -83,7 +80,6 @@ typedef enum { isc_timertype_undefined = -1, /*%< Undefined */ isc_timertype_ticker = 0, /*%< Ticker */ isc_timertype_once = 1, /*%< Once */ - isc_timertype_limited = 2, /*%< Limited */ isc_timertype_inactive = 3 /*%< Inactive */ } isc_timertype_t; diff --git a/lib/isc/timer.c b/lib/isc/timer.c index 30de75632f..fad06767ae 100644 --- a/lib/isc/timer.c +++ b/lib/isc/timer.c @@ -116,11 +116,6 @@ schedule(isc_timer_t *timer, isc_time_t *now, bool signal_ok) { if (result != ISC_R_SUCCESS) { return (result); } - if (timer->type == isc_timertype_limited && - isc_time_compare(&timer->expires, &due) < 0) - { - due = timer->expires; - } } else { if (isc_time_isepoch(&timer->idle)) { due = timer->expires; @@ -256,8 +251,6 @@ isc_timer_create(isc_timermgr_t *manager, isc_timertype_t type, REQUIRE(type == isc_timertype_inactive || !(isc_time_isepoch(expires) && isc_interval_iszero(interval))); REQUIRE(timerp != NULL && *timerp == NULL); - REQUIRE(type != isc_timertype_limited || - !(isc_time_isepoch(expires) || isc_interval_iszero(interval))); /* * Get current time. @@ -366,8 +359,6 @@ isc_timer_reset(isc_timer_t *timer, isc_timertype_t type, } REQUIRE(type == isc_timertype_inactive || !(isc_time_isepoch(expires) && isc_interval_iszero(interval))); - REQUIRE(type != isc_timertype_limited || - !(isc_time_isepoch(expires) || isc_interval_iszero(interval))); /* * Get current time. @@ -508,18 +499,6 @@ dispatch(isc_timermgr_t *manager, isc_time_t *now) { type = ISC_TIMEREVENT_TICK; post_event = true; need_schedule = true; - } else if (timer->type == isc_timertype_limited) { - int cmp; - cmp = isc_time_compare(now, &timer->expires); - if (cmp >= 0) { - type = ISC_TIMEREVENT_LIFE; - post_event = true; - need_schedule = false; - } else { - type = ISC_TIMEREVENT_TICK; - post_event = true; - need_schedule = true; - } } else if (!isc_time_isepoch(&timer->expires) && isc_time_compare(now, &timer->expires) >= 0) {