Modules§
- error
- Time error types.
Structs§
- Duration
- A
Durationtype 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
intervalandinterval_at. - Sleep
- Future returned by
sleepandsleep_until. - Timeout
- Future returned by
timeoutandtimeout_at.
Enums§
- Missed
Tick Behavior - Defines the behavior of an
Intervalwhen it misses a tick.
Functions§
- interval
- Creates new
Intervalthat yields with interval ofperiod. The first tick completes immediately. The defaultMissedTickBehaviorisBurst, but this can be configured by callingset_missed_tick_behavior. - interval_
at - Creates new
Intervalthat yields with interval ofperiodwith the first tick completing atstart. The defaultMissedTickBehaviorisBurst, but this can be configured by callingset_missed_tick_behavior. - sleep
- Waits until
durationhas elapsed. - sleep_
until - Waits until
deadlineis reached. - timeout
- Requires a
Futureto complete before the specified duration has elapsed. - timeout_
at - Requires a
Futureto complete before the specified instant in time.