forked from rcore-os/zCore
14 lines
312 B
Rust
14 lines
312 B
Rust
use core::time::Duration;
|
|
|
|
use super::future::{SleepFuture, YieldFuture};
|
|
|
|
/// Sleeps until the specified of time.
|
|
pub async fn sleep_until(deadline: Duration) {
|
|
SleepFuture::new(deadline).await
|
|
}
|
|
|
|
/// Yields execution back to the async runtime.
|
|
pub async fn yield_now() {
|
|
YieldFuture::default().await
|
|
}
|