Skip to main content

Clock

Trait Clock 

Source
pub trait Clock: Send + Sync {
    // Required method
    fn now(&self) -> Timestamp;
}
Expand description

Clock abstraction for monotonic time.

Use RealClock in production and MockClock for deterministic testing.

Required Methods§

Source

fn now(&self) -> Timestamp

Returns the current monotonic timestamp.

Implementors§