karyon_core 1.0.0

Runtime-agnostic async utilities (smol/tokio) for the karyon crates: executors, task groups, queues, timeouts, and optional Ed25519 crypto.
Documentation
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;
}