I've been coding along on YouTube and I'm at the end of HH Day 019, but I have an issue related to HH Day 018 (Enforcing a Video Frame Rate).
It appears that my Sleep() doesn't always abide by the granularity set by calling timeBeginPeriod.
The result is that the program breaks when I assert that frame time is less than the target frame time.
The time spent on actual work each frame is computed to be around 8 or 9 ms, and if I comment out the Sleep call, the program doesn't break - of course, we want to lay off the CPU if we can.
As a band-aid fix, I decreased the sleep time by 2 milliseconds (after trying 1), but doing so is obviously super janky / halfway banana cakes.
Has anyone else run into this?