- fixed: high uptime was causing overloads in uint32_t and float structures (float losing loss of precision) - this caused any computer online for more than a few days to experience jankiness with internal animations such as rotations and shader timers. Unfortunately, this sounds the death knell for 32-bit platforms, since uint64_t is now required in time-critical structures, which will hurt performance tremendeously, but 64-bit systems will be unaffected.

This commit is contained in:
Rachael Alexanderson 2017-11-14 15:52:54 -05:00
commit 763222b571
6 changed files with 17 additions and 13 deletions

View file

@ -60,9 +60,9 @@ static uint64_t MSToNS(unsigned int ms)
return static_cast<uint64_t>(ms) * 1'000'000;
}
static uint32_t NSToMS(uint64_t ns)
static uint64_t NSToMS(uint64_t ns)
{
return static_cast<uint32_t>(ns / 1'000'000);
return static_cast<uint64_t>(ns / 1'000'000);
}
static int NSToTic(uint64_t ns)
@ -125,7 +125,7 @@ uint64_t I_nsTime()
return GetClockTimeNS();
}
unsigned int I_msTime()
uint64_t I_msTime()
{
return NSToMS(I_nsTime());
}