Fix system_time implementation

When refactoring this and writing a common implementation for x86 and
x86_64 I missed a step in the calculation. We need to divide by 2^32 to
keep the value in the expected range.

Fixes #15658.
This commit is contained in:
Adrien Destugues
2020-01-26 10:44:05 +01:00
parent 3cba7254a8
commit 190d0372b3
+2 -1
View File
@@ -304,7 +304,8 @@ slower_sample:
extern "C" bigtime_t
system_time()
{
return rdtsc() * gTimeConversionFactor;
uint128 tsc(rdtsc());
return uint64((tsc * gTimeConversionFactor) >> 32);
}