Expand description
Utilities for tracking time (Tokio re-exports).
Structs§
- A measurement of a monotonically nondecreasing clock. Opaque and useful only with
Duration
. - Interval returned by
interval
andinterval_at
. - Future returned by
sleep
andsleep_until
. - Future returned by
timeout
andtimeout_at
.
Functions§
- Creates new
Interval
that yields with interval ofperiod
. The first tick completes immediately. The defaultMissedTickBehavior
isBurst
, but this can be configured by callingset_missed_tick_behavior
. - Creates new
Interval
that yields with interval ofperiod
with the first tick completing atstart
. The defaultMissedTickBehavior
isBurst
, but this can be configured by callingset_missed_tick_behavior
. - Waits until
duration
has elapsed. - Waits until
deadline
is reached. - Requires a
Future
to complete before the specified duration has elapsed.