timer_list.c
Include dependency graph for timer_list.c:
Functions
-
void timer_list_next(struct TimerList *tw, uint64_t now, timer_list_callback_t cb)
process the timer wheel, calling cb for every item that should be fired (for which
expiry_time
<=now
).The current algorithm is very basic. Under heavy load, two processes scheduled for different timers might be triggered (same seems to be true with BEAM). The only optimization is the next time is saved so the function doesn’t run every timer on every call.
- Parameters:
tw – the timer wheel
now – the current monotonic date
cb – the callback