pub fn after(duration: Duration) -> TimerNotable traits for Timerimpl Future for Timer    type Output = Instant;
Expand description

wait for until duration has elapsed.

this effectively give back control to async execution engine until duration is finished

Examples

use fluvio_future::timer::after;
use std::time::{Duration, Instant};

fluvio_future::task::run(async {
    after(Duration::from_secs(1)).await;
});