id summary reporter owner description type status milestone component version severity resolution keywords cc 9720 boost::this_thread::sleep_for() sometimes returns immediately on win32 Lars Hagström viboes "I have observed one instance of boost::this_thread::sleep_for returning immediately instead of waiting for the specified time. This happened on a Windows 7 32 bit machine, with Boost 1.55 and VS2012. Another relevant thing might be that it is a VM with 2 cpus running in XenServer 6.2. Attached is my test program, that starts a bunch of threads that all do a sleep_for(10 minutes). Main then immediately interrupts and joins the threads. The threads all check whether they timed out or whether they were interrupted. In case they time out we print the elapsed time, which of course is expected to be 10 minutes. Here is the output of my test program: {{{ first test Timeout! Elapsed time: 0.000039s wall, 0.000000s user + 0.000000s system = 0.000000s CPU (n/a%) . }}} I'm thinking that this could be something to do with the well known strangeness of QueryPerformanceCounter (see for example #8006). The VM host was probably under a fair bit of load at the time this test failed. " Bugs closed thread Boost 1.55.0 Problem fixed chrono thread QueryPerformanceCounter