Skip to content

Conversation

@divinity76
Copy link
Contributor

@divinity76 divinity76 commented Mar 11, 2025

was randomly failing on my windows-WSL-linux system. (I suspect it was because target time was rounded? Didn't figure out exactly why)

  • remove rounding of target time.
  • remove rounding of tolerance on windows, it looked dodgy.
  • hardcode tolerance rather than dynamically adjusting, makes it easier to reason about.
  • make a dedicated "isWithinTolerance"

Only tested on WSL-Linux as of writing, but the github CI should do the rest.

was randomly failing on my windows-WSL linux system.
remove rounding of target time.
remove rounding of tolerance on windows, it looked dodgy.
hardcode tolerance rather than dynamically adjusting, makes it easier to reason about.

Only tested on WSL-Linux as of writing, but the github CI should do the rest.
@divinity76
Copy link
Contributor Author

divinity76 commented Mar 14, 2025

The FreeBSD and MacOS wakeups are late by 74-106MS, enough to wonder if there actually is something wrong with the time_sleep_until implementation on these platforms 🤔

for comparison, Windows (the OS I expected to do worst) wakeup is late by <50ms, and the Linux wakeups are late by <10ms

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant