   Look at how I get my fixed frame rate
  Okay, I was wonderin' as in how to go about doin' the fixed frame rate thing in my D3D game loop. Now, whether or not this is a good idea, that's another story for another day; the requirements I have today, is to get the loop runnin' at some  fixed rate, so as to yield some extra CPU powers for other processes.At the beginnin' of the app, I determine the fixed frequency from the high resolution timer:LARGE_INTEGER m_liFreq;LARGE_INTEGER m_liFrameTime;QueryPerformanceFrequency(&m_liFreq);m_liFrameTime.QuadTime = m_liFreq.QuadPart / 64; m_liFrameTime    is the counter value allowed in each frame (note that I fixed it to 64 frames a second here).And then at the beginnin' of each each iteration in the game loop, I get the current time and compare it to the time when the previous iteration started:LARGE_INTEGER liCurrent;LARGE_INTEGER liDelta;QueryPerformanceCounter(&liCurrent);liDelta.QuadPart = liCurrent.QuadPart - m_liPrevious.QuadPart; liDelta    is the time between the previous frame, and the current one. So if liDelta    goes below m_liFrameTime    , the game loop should use Sleep() to put the current thread on hold, allowin' other threads to execute. if(liDelta.QuadPart < m_liFrameTime.QuadPart){    liDelta.QuadPart = m_liFrameTime.QuadPart - liDelta.QuadPart;    Sleep((liDelta.QuadPart / m_liFreq.QuadPart) * 1000);}  So that's about what my idea is, what do you think? It works? It won't? Or you have a better approach to go about it? I always happy to hear 'bout ideas that you've got. [edited by - HaywireGuy on February 10, 2004 7:52:14 PM]