melib/connections: add async sleep(dur: Duration)

lazy_fetch
Manos Pitsidianakis 3 years ago
parent 62db7d7f32
commit 613c3de3d2
No known key found for this signature in database
GPG Key ID: 73627C2F690DF710

@ -291,3 +291,7 @@ pub async fn timeout<O>(dur: Option<Duration>, f: impl Future<Output = O>) -> cr
Ok(f.await)
}
}
pub async fn sleep(dur: Duration) {
smol::Timer::after(dur).await;
}

Loading…
Cancel
Save