Skip to main content

Clock

Trait Clock 

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

Supplies now to the background planes. The core and admission layers take timestamps as arguments; implementations of this trait are the only code that decides what those timestamps are.

Required Methods§

Source

fn now(&self) -> Timestamp

The current instant, as this clock defines it.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§