[client] main: use the monotonic clock to calculate the ups/fps

The accumulated time is not the best way to do this as the timer
function callback may not be exactly every 1000ms, by using the
monotonic clock we will get more accurate results.
This commit is contained in:
Geoffrey McRae
2021-07-20 15:16:01 +10:00
parent 3f7261d7d9
commit e6e07e8f3f
2 changed files with 18 additions and 13 deletions

View File

@@ -104,7 +104,6 @@ struct AppState
RingBuffer renderTimings;
RingBuffer frameTimings;
atomic_uint_least64_t renderTime;
atomic_uint_least64_t renderCount, frameCount;
_Atomic(float) fps, ups;