spawn_after

Function spawn_after 

Source
pub fn spawn_after<F, T>(duration: Duration, future: F) -> Task<T> 
where F: Future<Output = T> + Send + 'static, T: Send + 'static,
Expand description

Spawn a future on a background queue after a delay.

The delay only applies to the initial spawn. If the future yields and is woken again, subsequent polls happen immediately.