]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/windows/semaphore.cpp
Fix references to deprecated functions
[libs/core.git] / source / core / windows / semaphore.cpp
index aeb1709241d31993495ad8d97c6ee4f2aa197009..c81f815a2ad4bbcb50897f1bb1a327fdd6ef1df5 100644 (file)
@@ -1,6 +1,6 @@
 #include <windows.h>
 #include <msp/core/systemerror.h>
-#include <msp/time/units.h>
+#include <msp/time/timedelta.h>
 #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<DWORD>(d/Time::msec));
        if(ret==WAIT_FAILED)
                throw system_error("WaitForSingleObject");
        return ret==WAIT_OBJECT_0;