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 host wall-clock observations.
Implementations may move backward between observations. Code that needs a correctness clock must instead use a logical tick, revision, or monotonic deadline.
Required Methods§
Sourcefn now(&self) -> Result<WallTimestamp>
fn now(&self) -> Result<WallTimestamp>
Observes the current host wall-clock timestamp.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".