Function glommio::timer::sleep[][src]

pub async fn sleep(wait: Duration)

Sleep for some time.

use glommio::{timer::sleep, LocalExecutor};
use std::time::Duration;

let ex = LocalExecutor::default();

ex.run(async {
    sleep(Duration::from_millis(100)).await;
});