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

[Windows] WaitUntil timer inaccurate #2005

Closed
msiglreith opened this issue Aug 21, 2021 · 0 comments · Fixed by #2007
Closed

[Windows] WaitUntil timer inaccurate #2005

msiglreith opened this issue Aug 21, 2021 · 0 comments · Fixed by #2007
Labels
C - needs discussion Direction must be ironed out DS - windows S - platform parity Unintended platform differences

Comments

@msiglreith
Copy link
Member

Using WaitUntil on Windows may be very inaccurate due to the scheduler time resolution which is by default several ms, currently we just assume 1ms. For real-time applications this leads to laggy behavior when using it for frame timing, usually waking up only with few ms delay.

One option would be to use timeBeginPeriod/timeEndPeriod to dynamically decrease the timer to a better resolution and spin wait the rest of the time. Drawback here is that it may affect battery lifetime.

@msiglreith msiglreith added DS - windows C - needs discussion Direction must be ironed out S - platform parity Unintended platform differences labels Aug 21, 2021
@maroider maroider linked a pull request Nov 2, 2021 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C - needs discussion Direction must be ironed out DS - windows S - platform parity Unintended platform differences
Development

Successfully merging a pull request may close this issue.

1 participant