Skip to content

Implement sleeping against non-monotonic clocks #230

Description

@arihant2math

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions