Skip to main content

Clock

Trait Clock 

Source
pub trait Clock:
    Send
    + Sync
    + 'static {
    // Required methods
    fn now_ms(&self) -> i64;
    fn sleep(&self, d: Duration) -> impl Future<Output = ()> + Send;
}

Required Methods§

Source

fn now_ms(&self) -> i64

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§