Skip to main content

Clock

Trait Clock 

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

A monotonic time source.

Required Methods§

Source

fn now(&self) -> Duration

Time since an origin of the clock’s choosing. Never decreases.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§