X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fwindows%2Fsemaphore.cpp;h=e45e4b9f70f921c02166a79be99fdc5dd21e05ce;hb=83fcabb1fc1acff5d115f07253f801fc3f7cca9a;hp=aeb1709241d31993495ad8d97c6ee4f2aa197009;hpb=609c9a508cfdc7b42c46c4f21d17639204165a00;p=libs%2Fcore.git diff --git a/source/core/windows/semaphore.cpp b/source/core/windows/semaphore.cpp index aeb1709..e45e4b9 100644 --- a/source/core/windows/semaphore.cpp +++ b/source/core/windows/semaphore.cpp @@ -1,6 +1,6 @@ -#include +#include "winapi.h" #include -#include +#include #include "semaphore.h" namespace Msp { @@ -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;