Currently moss support sleeping against the wall time:
|
pub async fn sleep(duration: Duration) { |
|
// A sleep of zero duration returns now. |
|
if duration.is_zero() { |
|
return; |
|
} |
|
|
|
if let Some(timer) = SYS_TIMER.get() { |
|
timer.sleep(duration).await; |
|
} |
|
} |
But we'd also need to be able to sleep against CLOCK_REALTIME, CLOCK_PROCESS_CPUTIME_ID, and CLOCK_THREAD_CPUTIME_ID, to properly implement sys_clock_nanosleep, timer_create, etc.
Currently moss support sleeping against the wall time:
moss-kernel/src/drivers/timer/mod.rs
Lines 282 to 291 in 39a5ef3
But we'd also need to be able to sleep against
CLOCK_REALTIME,CLOCK_PROCESS_CPUTIME_ID, andCLOCK_THREAD_CPUTIME_ID, to properly implementsys_clock_nanosleep,timer_create, etc.