Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sleep timers during OS suspend #1027

Merged
merged 1 commit into from
Oct 9, 2023
Merged

Fix sleep timers during OS suspend #1027

merged 1 commit into from
Oct 9, 2023

Commits on Oct 6, 2023

  1. Fix sleep timers during OS suspend

    On some platforms, `tokio::time::sleep` will sleep according to system
    uptime, not according to the wall clock. This means that for some
    operations that are time-sensitive, like token refreshes, tasks will
    sleep for too long when waking up from an OS suspend.
    
    To fix this, we introduce `sleep_systime`, which sleeps in small
    increments, checking wall clock time on wakeup, and otherwise marshalls
    out directly to `tokio::time::sleep` for short durations as they don't
    generally cause usability issues.
    calyptobai committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    0837c62 View commit details
    Browse the repository at this point in the history