Expand description
Time primitives for native and WebAssembly
Structs§
- Duration
- A
Durationtype 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. - System
Time - 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
SystemTimeinstances or learn about where in time aSystemTimelies.
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 incrate::retryso the same cross-platformrandpath is exercised. - timeout