Skip to main content

Module time

Module time 

Source
Expand description

Time primitives for native and WebAssembly

Structs§

Duration
A Duration type to represent a span of time, typically used for system timeouts.
Expired
Instant
A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.
SystemTime
A measurement of the system clock, useful for talking to external entities like the file system or other processes.

Constants§

UNIX_EPOCH
An anchor in time which can be used to create new SystemTime instances or learn about where in time a SystemTime lies.

Functions§

interval_stream
jittered_interval_stream
Like interval_stream, but de-synchronizes fleets of clients that boot together:
now_ms
now_ns
now_secs
rand_offset
Draw a random delay in [0, jitter]. Mirrors the jitter draw in crate::retry so the same cross-platform rand path is exercised.
timeout