Timer

Trait Timer 

Source
pub trait Timer:
    Send
    + Sync
    + 'static {
    // Required method
    fn delay(&self, duration: Duration) -> BoxFuture<'static, ()>;
}
Expand description

Timing facilities required by parts of the crate

The purpose is to make async-graphql integrate nicely with whatever environment you’re in.

Be it Tokio, smol, or even the browser.

Required Methods§

Source

fn delay(&self, duration: Duration) -> BoxFuture<'static, ()>

Returns a future that resolves after the specified duration

Implementors§

Source§

impl Timer for TokioTimer

Available on crate feature tokio only.