Clock

Trait Clock 

Source
pub trait Clock {
    type Snapshot;

    // Required method
    fn now(&self) -> Self::Snapshot;
}
Available on crate features fmt and std only.
Expand description

Captures the notion of “now” and returns a snapshot value. Captures the notion of time (“now”) and returns a snapshot value.

Required Associated Types§

Source

type Snapshot

The concrete timestamp representation captured by this clock.

Required Methods§

Source

fn now(&self) -> Self::Snapshot

Get the current time snapshot.

Implementors§