timeout

Function timeout 

Source
pub async fn timeout<'a, F>(
    duration: Duration,
    future: F,
) -> Result<F::Output, TimedOutError>
where F: Future + 'a,
Expand description

The same API as tokio::time::timeout, except it is uses on SuspendUnawareInstant for measuring time.