diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/thread_nt.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/thread_nt.h b/Python/thread_nt.h index a5246dd050..23d585cf9f 100644 --- a/Python/thread_nt.h +++ b/Python/thread_nt.h @@ -75,16 +75,16 @@ EnterNonRecursiveMutex(PNRMUTEX mutex, DWORD milliseconds) } } else if (milliseconds != 0) { /* wait at least until the target */ - DWORD now, target = GetTickCount() + milliseconds; + ULONGLONG now, target = GetTickCount64() + milliseconds; while (mutex->locked) { if (PyCOND_TIMEDWAIT(&mutex->cv, &mutex->cs, (long long)milliseconds*1000) < 0) { result = WAIT_FAILED; break; } - now = GetTickCount(); + now = GetTickCount64(); if (target <= now) break; - milliseconds = target-now; + milliseconds = (DWORD)(target-now); } } if (!mutex->locked) { |