#include
#include // timeGetTime() is in this on
// ...
static DWORD flNewElapsedTime;
static DWORD flOldElapsedTime = 1;
static int flFrameRate = 0;
// In the main game loop (before the render/calc/AI):
flNewElapsedTime = timeGetTime();
// and when all the stuff is done:
flFrameRate = (int)(1000/(flNewElapsedTime - flOldElapsedTime));
flOldElapsedTime = flNewElapsedTime;
flNewElapsedTime = timeGetTime();
// And there it is