mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Use tabledivide64() in timerUpdate()
git-svn-id: https://svn.eduke32.com/eduke32@8136 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
b298ed19ff
commit
4c4ffa80b4
1 changed files with 3 additions and 2 deletions
|
@ -40,8 +40,9 @@ ATTRIBUTE((flatten)) void timerUpdate(void)
|
|||
auto elapsedTime = time - timerlastsample;
|
||||
|
||||
uint64_t numerator = (elapsedTime.count() * (uint64_t) timerticspersec * steady_clock::period::num);
|
||||
int n = numerator / timerGetFreqU64();
|
||||
totalclock.setFraction(((numerator - n*timerGetFreqU64()) * 65536) / timerGetFreqU64());
|
||||
uint64_t freq = timerGetFreqU64();
|
||||
int n = tabledivide64(numerator, freq);
|
||||
totalclock.setFraction(tabledivide64((numerator - n*timerGetFreqU64()) * 65536, freq));
|
||||
|
||||
if (n <= 0) return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue