Skip to main content

monotonic_ns

Function monotonic_ns 

Source
pub fn monotonic_ns() -> u64
Expand description

Monotonic nanosecond timestamp.

Use for: event ordering, durations, version counters, timeline events. Never use for: user-visible timestamps (wall-clock attribution), since monotonic time has no relation to civil time.

Saturates at u64::MAX after ~584 years of process uptime — a non-issue in practice, and avoids unwrap on the u128 -> u64 narrowing.