A strange question here - but:
If I use WaitForSingleObject on a mutex with a 20 minute timeout. Then the machine goes into sleep mode (or sleep mode) while waiting ... After 12 hours - will my WaitForSingleObject call time out? or does the timer pause during sleep mode?
Just tested on Windows 7 with a timeout of 5 minutes and sleeping for 10 minutes. I was waiting for an endless thread.
Surprise - WaitForSingleObject was turned off after my car woke up.
WaitForSingleObject
According to https://msdn.microsoft.com/en-us/library/windows/desktop/ms687032(v=vs.85).aspx , WaitForSingleObject takes into account the time spent in low-power states, but only starting with Windows 8. So in Windows 7 it should behave as described above, but in Windows 8 and later versions the call will be disconnected only when the system has been actively started for the requested time.
Source: https://habr.com/ru/post/915257/More articles:partial error when using boost :: enable_shared_from_this - c ++size_t convert / cast to string in C ++ - c ++How to enlarge a circle with increasing text inside a circle? - htmlIs the concept of an algebraic data type close to class definitions in OO languages? - algebraic-data-typesHow to convert this Backus-Naur form expression to Regex (.Net)? - regexMule ESB can be deployed to Application Server - esb`java (0% 2! = 0) == false` - javaInstalling `numpy` in virtualenv on Ubuntu 11.10 - pythonFace recognition and face recognition technology in the phone - javascriptReading data blocks from a file in Python - pythonAll Articles