// Increment frame count frames++;
while (running) { // Render a frame renderFrame(); fps monitor activation code
// Initialize variables int frames = 0; float time = 0.0f; // in seconds // Increment frame count frames++; while (running) {
// Measure time elapsed since start or last FPS calculation time = getTimeElapsed(); // Increment frame count frames++