Skip to main content

Clock

Trait Clock 

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

A source of monotonic time.

Required Methods§

Source

fn now(&self) -> Instant

The current instant.

Source

fn utc_now(&self) -> Timestamp

The current wall-clock time, stamped on the user messages the model reads.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§