Skip to main content

Clock

Trait Clock 

Source
pub trait Clock {
    // Required methods
    fn now(&self) -> Timestamp;
    fn wait_until(&mut self, at: Timestamp);
}
Expand description

The clock a run reads, and waits on until a step’s time comes.

Required Methods§

Source

fn now(&self) -> Timestamp

Now.

Source

fn wait_until(&mut self, at: Timestamp)

Waits until at.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§