Module timer

Source
Expand description

Definitions for SleepProviderExt and related types.

Structs§

SleepUntilWallclock
A future implementing SleepProviderExt::sleep_until_wallclock.
Timeout
A timeout returned by SleepProviderExt::timeout.
TimeoutError
An error value given when a function times out.

Constants§

MAX_SLEEP 🔒
We never sleep more than this much, in case our system clock jumps.

Traits§

SleepProviderExt
An extension trait on SleepProvider for timeouts and clock delays.

Functions§

calc_next_delay 🔒
Return the amount of time we should wait next, when running sleep_until_wallclock(). Also return a boolean indicating whether we expect this to be the final delay.