static int oldtime, count, time; count++; if (count >= 10) { time = GetTickCount; FPS = 10000.0f / max(time - oldtime, 1); oldtime = time; count = 0; }
Steve ''Sly'' Williams Code Monkey Krome Studios
static int oldtime, count, time; count++; if (count >= 10) { time = GetTickCount; FPS = 10000.0f / max(time - oldtime, 1); oldtime = time; count = 0; }
static float FPS; static int oldtime, count, time; static LARGE_INTEGER liTime, liOldTime; count++; if (count >= 10) { QueryPerformanceCounter(&liTime); FPS = 10000000.0f / max((liTime.QuadPart - liOldTime.QuadPart), 1); liOldTime.QuadPart = liTime.QuadPart; count = 0; }