diff options
Diffstat (limited to 'tests/time/src.c')
-rw-r--r-- | tests/time/src.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/time/src.c b/tests/time/src.c index aaf2878f..d33885fe 100644 --- a/tests/time/src.c +++ b/tests/time/src.c @@ -96,7 +96,8 @@ int main() { clock_t start = clock(); printf("clock(start): %d\n", start >= 0); while (clock() - start < 2 * CLOCKS_PER_SEC); // Poor man's sleep(). - printf("clock(end): %d\n", time(NULL) - start_t == 2); + clock_t diff = time(NULL) - start_t; + printf("clock(end): %d\n", diff >= 2 && diff < 30); // Verify that ctime_r(x, buf) is equivalent to asctime_r(localtime(x), buf). time_t t7 = time(0); |