This commit is contained in:
Henrik Rydgård 2020-08-16 10:00:26 +02:00
parent 7aacf3df37
commit c8a06d40c9
2 changed files with 4 additions and 3 deletions

View file

@ -2,8 +2,9 @@
// http://linux.die.net/man/3/clock_gettime
// This time implementation caches the time for max performance (call time_now() as much as you like).
// This time implementation caches the time for max performance (call time_now_d() as much as you like).
// You need to call time_update() once per frame (or whenever you need the correct time right now).
// Or you can use real_time_now() directly.
void time_update();
@ -33,4 +34,4 @@ private:
bool endCalled_;
double totalTime_;
double endTime_;
};
};

View file

@ -175,7 +175,7 @@ bool RunAutoTest(HeadlessHost *headlessHost, CoreParameter &coreParameter, bool
// TODO: We must have some kind of stack overflow or we're not following the ABI right.
// This gets trashed if it's not static.
static double deadline;
deadline = time_now() + timeout;
deadline = time_now_d() + timeout;
Core_UpdateDebugStats(g_Config.bShowDebugStats || g_Config.bLogFrameDrops);