diff options
| author | Garrett D'Amore <garrett@damore.org> | 2016-12-23 12:22:24 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2016-12-23 12:22:24 -0800 |
| commit | 738d4a114af13a052c222e21f2c3ba0d3746cae2 (patch) | |
| tree | 22e83b3e834f17f271c4c7d4c08bb2370af8a141 /tests/platform.c | |
| parent | 667262f214441c66bcaeeae3b1b2ecbecf4aaf64 (diff) | |
| download | nng-738d4a114af13a052c222e21f2c3ba0d3746cae2.tar.gz nng-738d4a114af13a052c222e21f2c3ba0d3746cae2.tar.bz2 nng-738d4a114af13a052c222e21f2c3ba0d3746cae2.zip | |
Coarse clocks can return exact times.
Diffstat (limited to 'tests/platform.c')
| -rw-r--r-- | tests/platform.c | 4 |
1 files 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); }) |
