Modules§
- error
- Time error types.
Structs§
- Duration
- A
Duration
type to represent a span of time, typically used for system timeouts. - Instant
- A measurement of a monotonically nondecreasing clock.
Opaque and useful only with
Duration
. - Interval
- Interval returned by
interval
andinterval_at
. - Sleep
- Future returned by
sleep
andsleep_until
. - Timeout
- Future returned by
timeout
andtimeout_at
.
Enums§
- Missed
Tick Behavior - Defines the behavior of an
Interval
when it misses a tick.
Functions§
- interval
- 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
. - interval_
at - 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
. - sleep
- Waits until
duration
has elapsed. - sleep_
until - Waits until
deadline
is reached. - timeout
- Requires a
Future
to complete before the specified duration has elapsed. - timeout_
at - Requires a
Future
to complete before the specified instant in time.