diff options
Diffstat (limited to 'Source/WTF/wtf/threads/BinarySemaphore.cpp')
-rw-r--r-- | Source/WTF/wtf/threads/BinarySemaphore.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/WTF/wtf/threads/BinarySemaphore.cpp b/Source/WTF/wtf/threads/BinarySemaphore.cpp index 5f60aaf22..f4452496a 100644 --- a/Source/WTF/wtf/threads/BinarySemaphore.cpp +++ b/Source/WTF/wtf/threads/BinarySemaphore.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Apple Inc. All rights reserved. + * Copyright (C) 2010-2016 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,8 +26,6 @@ #include "config.h" #include "BinarySemaphore.h" -#if !PLATFORM(WIN) - namespace WTF { BinarySemaphore::BinarySemaphore() @@ -47,13 +45,14 @@ void BinarySemaphore::signal() m_condition.signal(); } -bool BinarySemaphore::wait(double absoluteTime) +bool BinarySemaphore::wait(TimeWithDynamicClockType absoluteTime) { MutexLocker locker(m_mutex); bool timedOut = false; while (!m_isSet) { - timedOut = !m_condition.timedWait(m_mutex, absoluteTime); + timedOut = !m_condition.timedWait( + m_mutex, absoluteTime.approximateWallTime().secondsSinceEpoch().value()); if (timedOut) return false; } @@ -64,5 +63,3 @@ bool BinarySemaphore::wait(double absoluteTime) } } // namespace WTF - -#endif // !PLATFORM(WIN) |