[Development] Windows Timer Resolution: The Great Rule Change

Philippe philwave at gmail.com
Wed Oct 7 15:47:27 CEST 2020


To whoever is concerned...
 
In short: "The behavior of the Windows scheduler changed significantly in Windows 10 2004"
 
Especially, the "common" thread sleep function with 1 as argument
"Sleep(1)", that did cause the thread to sleep about 1 or 2 milliseconds,
is now halting for 15 milliseconds.

As the following article says, WaitForSingleObject and
WaitForMultipleObjects are also affected.

I confirm the Sleep() change with my own tests; it's a bit like if
Sleep(T) sleeps for
std::max(15, T +15);

Obviously, QThread::msleep is affected, but probably other APIs with a
timeout (?)
 
https://randomascii.wordpress.com/2020/10/04/windows-timer-resolution-the-great-rule-change/

Philippe



More information about the Development mailing list