I guess it will be addressed in later episodes (I don't remember).
You can't rely on Sleep to ensure your frames are 33ms. Even if you could make sure they were the right length, you don't know when the frame is presented to the screen and so you don't know when to start counting. Later on the series, Casey will switch to use OpenGL and you'll then be able to properly synchronize your frames. If you don't want to wait and use Windows 7 with the compositor enabled or later version of Windows, you can call DwmFlush
to make the program wait for the window compositor to present the frame on the screen. You won't need any Sleep on busy loop any more.