mirror of
https://github.com/isar/libmdbx.git
synced 2025-08-19 19:39:26 +08:00
mdbx: more cleanup for Windows.
This commit is contained in:
@@ -94,8 +94,8 @@ time now_motonic() {
|
||||
if (reciprocal == 0) {
|
||||
if (!QueryPerformanceFrequency(&Frequency))
|
||||
failure_perror("QueryPerformanceFrequency()", GetLastError());
|
||||
reciprocal =
|
||||
((UINT64_C(1) << 32) + Frequency.QuadPart / 2) / Frequency.QuadPart;
|
||||
reciprocal = (uint32_t)(((UINT64_C(1) << 32) + Frequency.QuadPart / 2) /
|
||||
Frequency.QuadPart);
|
||||
assert(reciprocal);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ time now_motonic() {
|
||||
failure_perror("QueryPerformanceCounter()", GetLastError());
|
||||
|
||||
time result;
|
||||
result.integer = Counter.QuadPart / Frequency.QuadPart;
|
||||
result.integer = (uint32_t)(Counter.QuadPart / Frequency.QuadPart);
|
||||
uint64_t mod = Counter.QuadPart % Frequency.QuadPart;
|
||||
assert(mod < UINT32_MAX);
|
||||
result.fractional = UInt32x32To64((uint32_t)mod, reciprocal);
|
||||
|
Reference in New Issue
Block a user