Skip to main content

Clock

Trait Clock 

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

The instant core reads the current time from.

Shareable across threads, because the expiry driver reads it from a thread of its own while callers read it from theirs.

Required Methods§

Source

fn now(&self) -> Timestamp

The instant now.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§