3 ms·
On windows you can get 1ms accuracy out of the built in Sleep() function by calling timeBeginPeriod[1] It sets the resolution of timers in that process to the s
by wheybags 4y ago
On windows you can get 1ms accuracy out of the built in Sleep() function by calling timeBeginPeriod[1] It sets the resolution of timers in that process to the specified ms value. I've used this + spinning to make high res sleep before and it works well.
1: https://docs.microsoft.com/en-us/windows/win32/api/timeapi/nf-timeapi-timebeginperiod https://docs.microsoft.com/en-us/windows/win32/api/timeapi/n...
- beagle3 4y agoAbout ~20 years ago, I discovered that using WinSock's "select()" on Win2K can give you microsecond sleep resolution with reasonable (100us or so) precision. It was still that way on XP, I have no idea if it stayed that way for Vista/7/8/8.1/10/11