Function dreadnought::time::sleep
source · pub fn sleep(duration: Duration) -> Sleep ⓘ
Expand description
Waits until the specified number of ticks has elapsed.
The end number of ticks is calculated when the function is called so:
# async fn main() {
let future = dreadnought::time::sleep(1000);
// Blocking sleep
sleep::sleep(1000);
future.await;
# }
Would take 1000 ticks to complete.