pub async fn timeout<F, T>(duration: Duration, f: F) -> Result<T>where F: Future<Output = Result<T>>,
Awaits a future or times out after a duration of time.