mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
timer.cpp: fix order of operations issue with timerUpdate()
git-svn-id: https://svn.eduke32.com/eduke32@8018 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
2895b36b72
commit
fd41554ad7
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ ATTRIBUTE((flatten)) void timerUpdate(void)
|
|||
{
|
||||
auto time = steady_clock::now();
|
||||
auto elapsedTime = time - timerlastsample;
|
||||
int n = elapsedTime.count() * (uint64_t) timerticspersec / timerGetFreqU64() * steady_clock::period::num;
|
||||
int n = (elapsedTime.count() * (uint64_t) timerticspersec * steady_clock::period::num) / timerGetFreqU64();
|
||||
|
||||
if (n <= 0) return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue