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:
@@ -304,7 +304,8 @@ slower_sample:
|
||||
extern "C" bigtime_t
|
||||
system_time()
|
||||
{
|
||||
return rdtsc() * gTimeConversionFactor;
|
||||
uint128 tsc(rdtsc());
|
||||
return uint64((tsc * gTimeConversionFactor) >> 32);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user