3 ms·
WM_TIMER has a flaw the author is not aware of. It is a low priority event that yields to pretty much all other events in the message loop. Meaning if a user i
by delfinom 2y ago
WM_TIMER has a flaw the author is not aware of. It is a low priority event that yields to pretty much all other events in the message loop.
Meaning if a user is busy jerking off a mouse which is causing WM_MOUSEMOVE events, the WM_TIMER will never fire at the expected time.
There is a hack to peek the next event specifically looking for WM_TIMER, on every other event call, which would trigger it on the queue.
https://devblogs.microsoft.com/oldnewthing/20191108-00/?p=103080 https://devblogs.microsoft.com/oldnewthing/20191108-00/?p=10...