From a691fa7fca30fb6e964c50b9001ab48018754218 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 8 Dec 2016 19:00:30 +0100 Subject: Be verbose about the sem_wait timeout. --- test/semaphoretest.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/semaphoretest.cc') diff --git a/test/semaphoretest.cc b/test/semaphoretest.cc index 3211930..9c9d116 100644 --- a/test/semaphoretest.cc +++ b/test/semaphoretest.cc @@ -64,6 +64,8 @@ public: bool res = sem.wait(std::chrono::milliseconds(1000)); CPPUNIT_ASSERT(!res); // false means timeout auto stop = std::chrono::steady_clock::now(); + auto d = dist((stop - start), std::chrono::milliseconds(1000)); + printf("%lld\n", d.count()); // Allow +/-1ms skew CPPUNIT_ASSERT(dist((stop - start), std::chrono::milliseconds(1000)) -- cgit v1.2.3