Make love.timer.getFPS and love.timer.getAverageDelta microsecond-accurate

This commit is contained in:
Bart van Strien
2013-03-10 22:16:23 +01:00
parent 28af989a00
commit 63c57ba3f8
+3 -3
View File
@@ -71,12 +71,12 @@ void Timer::step()
prevTime = currTime;
// Get ticks from SDL
currTime = SDL_GetTicks();
currTime = getMicroTime();
// Convert to number of seconds
dt = (currTime - prevTime)/1000.0;
dt = currTime - prevTime;
double timeSinceLast = (currTime - prevFpsUpdate)/1000.0;
double timeSinceLast = currTime - prevFpsUpdate;
// Update FPS?
if (timeSinceLast > fpsUpdateFrequency)
{