in worker.c [458:477]
static uint64_t run_ncrx_callbacks(struct ncrx_worker *cur, uint64_t lastrun)
{
uint64_t i, now = now_mono_ms();
if (now == lastrun)
goto out;
fatal_on(now < lastrun, "Time went backwards\n");
/*
* It's possible we wrapped: in that case, we simply iterate over the
* entire wheel and drain each list until we hit a callback after now.
* Otherwise, we only iterate over the buckets that lie on [last,now].
*/
for (i = max(lastrun, now - NETCONS_RTO + 1); i <= now; i++)
do_ncrx_callbacks(cur, &cur->tlist[i % NETCONS_RTO]);
out:
return now;
}