Function tokio::time::sleep_until
source · [−]pub fn sleep_until(deadline: Instant) -> SleepⓘNotable traits for Sleepimpl Future for Sleep type Output = ();
Expand description
Waits until deadline
is reached.
No work is performed while awaiting on the sleep future to complete. Sleep
operates at millisecond granularity and should not be used for tasks that
require high-resolution timers.
Cancellation
Canceling a sleep instance is done by dropping the returned future. No additional cleanup work is required.