timeout_at

Function timeout_at 

Source
pub fn timeout_at(instant: Instant) -> Timeout
Expand description

Create a timeout tied to the current loop

This is a shortcut for:

Timeout::new_at(instant, &handle()).unwrap()

§Panics

When no loop is running (handle() panics)

(Note: while we technically unwrap() constructor it never fails in current tokio)