Skip to main content

Clock

Trait Clock 

Source
pub trait Clock {
    // Required method
    fn sleep(&self, duration: Duration) -> impl Future<Output = ()> + Send;
}
Expand description

The delay port the executor waits through.

Required Methods§

Source

fn sleep(&self, duration: Duration) -> impl Future<Output = ()> + Send

Wait for duration, then resolve.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§