Browse Source

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

lazy_fetch
Manos Pitsidianakis 11 months ago
parent
commit
613c3de3d2
Signed by: epilys GPG Key ID: 73627C2F690DF710
  1. 4
      melib/src/connections.rs

4
melib/src/connections.rs

@ -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