In the Q&A on day 018, Casey answers a question regarding (testSecondsElapsedForFrame < targetSecondsPerFrame) around 01:12:00. Even though the Visual Studio console shows his program exceeding (at 34-35ms) the target milliseconds per frame (33.33), he doesn't seem to trigger that assert in his program, and I do.
Does sleep somehow exhibit different behavior on different systems? I wouldn't think so, because I was able to set the sleep granularity to 1 ms. Nonetheless, the program with the sleep commented out runs anywhere between 3-7 ms on a given frame on my system. With the sleep(), it's somewhere around 34 ms and triggers the assert (seemingly on the scale of 1/1,000 of a second at times). Is it a underlying bug in the code that he fixes later, or just Windows and hardware interactions?
Update: Just tested using the clean 018 source and the same issue happens, so it's probably unintended behavior.