Skip to main content

Clock

Trait Clock 

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

A clock trait used to obtain the current time.

Required Methods§

Source

fn now(&self) -> Timestamp

Implementors§

Source§

impl Clock for SystemClock

Available on not (target_family=wasm and target_os=unknown).
Source§

impl<F> Clock for F
where F: Fn() -> Timestamp + Send + Sync,