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

Revise scrotWaitUntil interface #323

Merged
merged 4 commits into from
May 31, 2023

Commits on May 27, 2023

  1. introduce miliToNanoSec()

    N-R-K committed May 27, 2023
    Configuration menu
    Copy the full SHA
    6772c8d View commit details
    Browse the repository at this point in the history
  2. introduce clockNow()

    this will be useful for converting some of the nanosleep calls into
    scrotSleepFor().
    N-R-K committed May 27, 2023
    Configuration menu
    Copy the full SHA
    646f713 View commit details
    Browse the repository at this point in the history
  3. rework scrotWaitUntil() => scrotSleepFor()

    absolute time is really awkward to use. scrotSleepFor() instead takes a
    starting timestamp and a relative millisecond offset from that start and
    returns back the ending timestamp.
    
    this, combined with clockNow(), makes the API easy to use and easy to
    replace the existing nanosleep calls with.
    N-R-K committed May 27, 2023
    Configuration menu
    Copy the full SHA
    a57459c View commit details
    Browse the repository at this point in the history

Commits on May 31, 2023

  1. options: reduce max delay to INT_MAX/1000

    avoids potential multiplication overflow when the seconds are converted
    into milliseconds.
    N-R-K committed May 31, 2023
    Configuration menu
    Copy the full SHA
    ce8e7f7 View commit details
    Browse the repository at this point in the history