pub trait MonotonicClock: Send + Sync {
// Required method
fn now(&self) -> Duration;
// Provided method
fn resolution(&self) -> Duration { ... }
}Expand description
An elapsed-time source with a stable, arbitrary epoch.
Values must never decrease or wrap during a boot, including across concurrent reads. UTC corrections must not affect this source. Suspend accounting is a platform property; callers must not assume suspended time is included.
Required Methods§
Provided Methods§
Sourcefn resolution(&self) -> Duration
fn resolution(&self) -> Duration
Nominal source quantization; override for custom platform clocks.