From: Mikko Rasa Date: Tue, 20 Sep 2016 00:40:46 +0000 (+0300) Subject: Use the correct unit of time for WaitForSingleObject X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=b5c408c0ec353dda001db6fdacde5637fed45bee;p=libs%2Fcore.git Use the correct unit of time for WaitForSingleObject --- 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;