1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Change rct2_measure_fps to only call time() once

This commit is contained in:
Alexander Overvoorde
2016-07-23 17:32:15 +02:00
parent 9e6db92446
commit c8a0cedf33

View File

@@ -309,12 +309,14 @@ static void rct2_measure_fps()
{
_frames++;
if (time(NULL) != _lastSecond) {
time_t currentTime = time(NULL);
if (currentTime != _lastSecond) {
_currentFPS = _frames;
_frames = 0;
}
_lastSecond = time(NULL);
_lastSecond = currentTime;
}
static void rct2_draw_fps(rct_drawpixelinfo *dpi)