Skip to main content

Module time

Module time 

Source
Available on crate features runtime and time only.
Expand description

Utilities for tracking time.

Structs§

Elapsed
Error returned by timeout or timeout_at.
Interval
Interval returned by interval and interval_at

Functions§

interval
Creates new Interval that yields with interval of period. The first tick completes immediately.
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.
timeout_at
Require a Future to complete before the specified instant in time.