Skip to main content

GraceClock

Trait GraceClock 

Source
pub trait GraceClock {
    // Required method
    fn now_millis(&self) -> i64;
}
Expand description

A monotonic clock for the grace window, injectable so tests drive time deterministically. Only differences between readings are meaningful; the absolute value has no meaning.

Required Methods§

Source

fn now_millis(&self) -> i64

A monotonically non-decreasing reading in milliseconds.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§