melib/connections: add async sleep(dur: Duration)
parent
62db7d7f32
commit
613c3de3d2
|
@ -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…
Reference in New Issue