pub fn sleep(duration: Duration) -> SleepExpand description
Creates a new Sleep that will complete after the specified duration.
ยงExamples
use compo::prelude::*;
async fn example() {
// Sleep for 100 milliseconds
sleep(Duration::from_millis(100)).await;
}