Skip to main content

timeout

Function timeout 

Source
pub fn timeout(duration: Duration, cb: impl FnOnce() + 'static) -> TimerHandle
Expand description

Run cb once after duration. A delay alias naming the run-after-deadline intent. This is not withTimeout: it cannot abort in-flight work, it only starts cb once the duration elapses.