diff --git a/RTCP/IONProc/src/WallClockTime.h b/RTCP/IONProc/src/WallClockTime.h index 465eae511f615ca4449383fc6a4bfe520e9bb86e..55e5e60272f3de7b1b547181e8fd2c6e23d8b870 100644 --- a/RTCP/IONProc/src/WallClockTime.h +++ b/RTCP/IONProc/src/WallClockTime.h @@ -43,6 +43,7 @@ class WallClockTime bool waitUntil(const struct timespec &); bool waitUntil(time_t); bool waitUntil(const TimeStamp &); + void waitForever(); void cancelWait(); @@ -84,6 +85,13 @@ inline bool WallClockTime::waitUntil(const TimeStamp ×tamp) return waitUntil(static_cast<struct timespec>(timestamp)); } +inline void WallClockTime::waitForever() +{ + ScopedLock scopedLock(itsMutex); + + while (!itsCancelled) + itsCondition.wait(itsMutex); +} inline void WallClockTime::cancelWait() {