summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/timer.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/timer.cpp b/test/timer.cpp
index e47cb21b..41c132bd 100644
--- a/test/timer.cpp
+++ b/test/timer.cpp
@@ -81,6 +81,19 @@ protected:
return TestFail;
}
+ /*
+ * 32 bit wrap test
+ * Nanosecond resolution in a 32 bit value wraps at 4.294967
+ * seconds (0xFFFFFFFF / 1000000)
+ */
+ timer.start(4295);
+ dispatcher->processEvents();
+
+ if (timer.isRunning() || timer.jitter() > 50) {
+ cout << "Timer expiration test failed" << endl;
+ return TestFail;
+ }
+
/* Timer restart. */
timer.start(500);