aboutsummaryrefslogtreecommitdiff
path: root/core/src/async_util/sleep.rs
blob: f72b825d5f78da77dc2081844c52545d2e8bb592 (plain)
1
2
3
4
5
6
pub async fn sleep(duration: std::time::Duration) {
    #[cfg(feature = "smol")]
    smol::Timer::after(duration).await;
    #[cfg(feature = "tokio")]
    tokio::time::sleep(duration).await;
}