-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Windows: Increase wait timer resolution #2007
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: Increase wait timer resolution #2007
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having this be user-configurable in some way sounds like a good idea, given the potential battery-savings, but that can be added later.
PS: Your branch name is misspelled (resolition != resolution).
… using `WaitUntil`.
8e743af to
cdb0b30
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a once-over and marked everything that looked to be resolved as "resolved".
I only have a couple of nitpicks.
Co-authored-by: Markus Røyset <maroider@protonmail.com>
|
Thanks for reviewing again, addressed the remaining parts |
Addresses #2005
Temporarily increase the timer resolution for the wait operation. By default it's around 16ms which is too long for most realtime applications and leads to unpredictable results. A future enhancement in this direction could be allow the user to control it. Possible use case would be UI application with some animations running with minimal energy impact.
Reported by https://twitter.com/olson_dan/status/1428840173354160128?s=20
With the given change for the wgpu
waterexample the framerate is much closer to the target of 16.6ms on my system.Before
After
cargo fmthas been run on this branchcargo docbuilds successfullyCHANGELOG.mdif knowledge of this change could be valuable to users