diff options
Diffstat (limited to 'cpp/src/tests/ProducerConsumerTest.cpp')
-rw-r--r-- | cpp/src/tests/ProducerConsumerTest.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cpp/src/tests/ProducerConsumerTest.cpp b/cpp/src/tests/ProducerConsumerTest.cpp index 410a846b8b..789e365a85 100644 --- a/cpp/src/tests/ProducerConsumerTest.cpp +++ b/cpp/src/tests/ProducerConsumerTest.cpp @@ -74,9 +74,9 @@ class WatchedCounter : public Monitor { return count; } - bool waitFor(int i, Time timeout=TIME_SEC) { + bool waitFor(int i, Duration timeout=TIME_SEC) { Lock l(*this); - Time deadline = timeout+now(); + AbsTime deadline(now(), timeout); while (count != i) { if (!wait(deadline)) return false; @@ -116,8 +116,8 @@ class ProducerConsumerTest : public CppUnit::TestCase struct ConsumeTimeoutRunnable : public Runnable { ProducerConsumerTest& test; - Time timeout; - ConsumeTimeoutRunnable(ProducerConsumerTest& test_, const Time& t) + Duration timeout; + ConsumeTimeoutRunnable(ProducerConsumerTest& test_, const Duration& t) : test(test_), timeout(t) {} void run() { test.consumeTimeout(timeout); } }; @@ -143,7 +143,7 @@ class ProducerConsumerTest : public CppUnit::TestCase consumeInternal(consumer); }; - void consumeTimeout(const Time& timeout) { + void consumeTimeout(const Duration& timeout) { ProducerConsumer::ConsumerLock consumer(pc, timeout); consumeInternal(consumer); }; |