u32 then = device->getTimer()->getTime(); while(device->run()) { // Work out a frame delta time. const u32 now = device->getTimer()->getTime(); const f32 frameDeltaTime = (f32)(now - then) / 1000.f; // Time in seconds then = now; } I've got this code from here: Tutorial!