Skip to content

Comment on Making an Accurate Sleep() Functionparent

Comments

Windows can also use beginTimePeriod() to set the timer resolution (sadly system wide) so if one needs a 1ms time period that is plausible with defaults. But you do have to set it. Otherwise you have to depend on the variable tick timer to give you want you want. Which don't get me wrong can be good, but if you need more guaranteed timer ticks... it may not be the way.

https://docs.microsoft.com/en-us/windows/win32/api/timeapi/n...

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.