From 738d4a114af13a052c222e21f2c3ba0d3746cae2 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 23 Dec 2016 12:22:24 -0800 Subject: Coarse clocks can return exact times. --- tests/platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/platform.c b/tests/platform.c index 392c5c9d..85c7ba59 100644 --- a/tests/platform.c +++ b/tests/platform.c @@ -49,7 +49,7 @@ TestMain("Platform Operations", { Convey("usleep works", { nni_usleep(100000); - So((getms() - now) > 100); // cannot be *shorter*!! + So((getms() - now) >= 100); // cannot be *shorter*!! So((getms() - now) < 150); // crummy clock resolution? }) Convey("times work", { @@ -66,7 +66,7 @@ TestMain("Platform Operations", { So(msend > now); usdelta = (int)((usend - usnow) / 1000); msdelta = (int)((msend - now)); - So(usdelta > 200); + So(usdelta >= 200); So(usdelta < 220); So(abs(msdelta - usdelta) < 20); }) -- cgit v1.2.3-70-g09d2