From b5c408c0ec353dda001db6fdacde5637fed45bee Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 20 Sep 2016 03:40:46 +0300 Subject: [PATCH] Use the correct unit of time for WaitForSingleObject --- source/core/windows/semaphore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/windows/semaphore.cpp b/source/core/windows/semaphore.cpp index aeb1709..749d993 100644 --- a/source/core/windows/semaphore.cpp +++ b/source/core/windows/semaphore.cpp @@ -38,7 +38,7 @@ void Semaphore::wait() bool Semaphore::wait(const Time::TimeDelta &d) { - DWORD ret = WaitForSingleObject(priv->handle, (DWORD)(d/Time::usec)); + DWORD ret = WaitForSingleObject(priv->handle, static_cast(d/Time::msec)); if(ret==WAIT_FAILED) throw system_error("WaitForSingleObject"); return ret==WAIT_OBJECT_0; -- 2.45.2