diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-12-08 19:00:30 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-12-08 19:00:30 +0100 |
commit | a691fa7fca30fb6e964c50b9001ab48018754218 (patch) | |
tree | 04152590bba2fdf9327bc3f7fb47277e152b0018 | |
parent | 1a4e50c88cfd2816b2addd9b135e27b20fc2e162 (diff) |
Be verbose about the sem_wait timeout.
-rw-r--r-- | test/semaphoretest.cc | 2 |
1 files changed, 2 insertions, 0 deletions
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)) |