Clock

Trait Clock 

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

Clock trait for abstracting time operations.

Provides current time for the event counter system.

This trait enables time-travel testing via TestClock and production use via SystemClock.

Required Methods§

Source

fn now(&self) -> DateTime<Utc>

Implementors§