TimingWheels.timeUntilNextEvent

Time until next scheduled timer event. You provide tick size and current real world time. This function find ticks until next event and use time of the start and total steps executed to calculate time delta from realNow to next event.

struct TimingWheels(T)
Nullable!Duration
timeUntilNextEvent
(
const Duration tick
,
ulong realNow
)

Parameters

tick Duration

your accepted tick duration.

realNow ulong

real world now, result of Clock.currStdTime

Return Value

Type: Nullable!Duration

time until next event. Can be zero or negative in case you have already expired events.

Meta