From 30c9eb1ee51c80081f00d8625872becf62063a6a Mon Sep 17 00:00:00 2001 From: mikee47 Date: Wed, 10 Jan 2024 16:48:37 +0000 Subject: [PATCH] Don't fail clock check as Host timers cannot be guaranteed jitter-free --- tests/HostTests/modules/Clocks.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/HostTests/modules/Clocks.cpp b/tests/HostTests/modules/Clocks.cpp index fe9803b767..0b15d025ea 100644 --- a/tests/HostTests/modules/Clocks.cpp +++ b/tests/HostTests/modules/Clocks.cpp @@ -53,10 +53,12 @@ template class ClockTestTemplate : public TestG debug_w("Ratio: x %f", float(elapsedTicks) / (time - startTime)); uint32_t us = Micros::ticksToTime(elapsedTicks); debug_w("Apparent time: %u", us); +#ifndef ARCH_HOST // Up-timers may report 0 if inactive if(endTicks != 0 || startTicks != 0) { REQUIRE(abs(int(us - duration)) < 500); // Allow some latitude } +#endif } }