Skip to main content

RuntimeClock

Trait RuntimeClock 

Source
pub trait RuntimeClock: Send + Sync {
    // Required method
    fn now_seconds(&self) -> f64;
}
Expand description

Monotonic second source injectable for deterministic tests.

Required Methods§

Source

fn now_seconds(&self) -> f64

Return a finite nondecreasing timestamp in seconds.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§