Hi Serdar, Yes, this is definitely something I would like to explore. If I understand it, raising the timer resolution will affect how Windows idles, which could have a significant (or not?) impact on power usage. Is that right? This would be important on laptops of course, so as you said it would need to be a user choice. I would be interesting to compare this to busy-waiting, with regards to accuracy and system load.
On Sunday, January 28, 2018 at 12:03:21 AM UTC+9, Serdar Yegulalp wrote: > > On Win32, you need to raise the timer resolution to get truly accurate > sleep on a 1/60 second basis. I've written some functions to do this > manually, but I'm thinking we might want to provide a way to do this > natively in Pyglet. > > The big caveat is that the user should have some way to control it. If you > have an app that doesn't need that granular a level of timing, you're not > supposed to raise the timer resolution, since that's resource-intensive. > You turn it on when you need it and turn it off when you don't. This also > eliminates the need for busy-waiting, since you can get extremely precise > wait times this way. > > Perhaps for 1.4 I could provide a pull request where there's a clock > setting that allows toggling of the use of the higher timer resolution on > demand. > -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/d/optout.
