Module time

Source
Expand description

Utilities for tracking time.

Re-exports§

pub use std::time::Duration;
pub use std::time::Instant;

Modules§

error
Time error types.

Structs§

Interval
Interval returned by interval and interval_at.
Sleep
Future returned by sleep and sleep_until.
TimeHandle
Handle to a shared time source.

Enums§

MissedTickBehavior
Defines the behavior of an Interval when it misses a tick.

Functions§

advancemadsim
Advances time.
interval
Creates new Interval that yields with interval of period.
interval_at
Creates new Interval that yields with interval of period with the first tick completing at start.
sleep
Waits until duration has elapsed.
sleep_until
Waits until deadline is reached.
timeout
Require a Future to complete before the specified duration has elapsed.