Skip to main content

MonotonicClock

Trait MonotonicClock 

Source
pub trait MonotonicClock:
    Send
    + Sync
    + Debug {
    // Required method
    fn now_nanos(&self) -> u64;
}
Expand description

Monotonic clock abstraction. Production uses SystemMonotonicClock (a process-start Instant baseline); tests inject a fake that can be advanced by hand so the rejection-rate derivation is deterministic.

Required Methods§

Source

fn now_nanos(&self) -> u64

Nanoseconds elapsed since an arbitrary, fixed epoch. Only differences are meaningful; the absolute value carries no meaning.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§