Skip to main content

WallClock

Trait WallClock 

Source
pub trait WallClock: Send + Sync {
    // Required method
    fn now(&self) -> Result<WallTimestamp>;

    // Provided method
    fn now_ms(&self) -> Result<u64> { ... }
}
Expand description

Object-safe source of optional human wall-time evidence.

Required Methods§

Source

fn now(&self) -> Result<WallTimestamp>

Observes wall time, which may move backward.

Provided Methods§

Source

fn now_ms(&self) -> Result<u64>

Observes Unix milliseconds.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§