pub trait Clock {
    // Required methods
    fn tick_now(&self) -> Tick;
    fn wait(
        &self,
        tick: Tick
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'static>>;
}
Expand description

A clock which allows querying of the current tick as well as waiting for a tick to be reached.

Required Methods§

source

fn tick_now(&self) -> Tick

Yields the current tick.

source

fn wait(&self, tick: Tick) -> Pin<Box<dyn Future<Output = ()> + Send + 'static>>

Yields a future which concludes when the given tick is reached.

Implementors§