Function fluvio_future::timer::after
source · [−]pub fn after(duration: Duration) -> TimerⓘNotable 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;
});