Skip to main content

Module time

Module time 

Source
Expand description

Timers, for the few things that have no event source (clocks, /proc counters), and one-shot delays (Task::future(sleep(..)), e.g. to show something for a moment).

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.

Functions§

every
Returns a Subscription that produces messages at a set interval.
sleep
Waits duration. Nothing starts until the task runs it, so it’s safe to build in update.