diff options
author | jerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68> | 2002-01-02 23:04:29 +0000 |
---|---|---|
committer | jerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68> | 2002-01-02 23:04:29 +0000 |
commit | 6141dbccd4e602dbd2527e3bc46da85ca0ec4605 (patch) | |
tree | 197fb641baca2748de22460801162c1441948709 /test/testsleep.c | |
parent | 00f9c55499fcae0521df28a3b82275fbc6e4b804 (diff) | |
download | libapr-6141dbccd4e602dbd2527e3bc46da85ca0ec4605.tar.gz |
Make the time checking be in the 0.99*interval-1.01*interval range as
apr_sleep is not guaranteed to be exact.
Reviewed by: Aaron Bannert
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62698 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testsleep.c')
-rw-r--r-- | test/testsleep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/testsleep.c b/test/testsleep.c index 4fe99cc59..adc0f3fb5 100644 --- a/test/testsleep.c +++ b/test/testsleep.c @@ -77,7 +77,7 @@ static void do_sleep(int howlong) diff = now - then; printf("%-60s"," Just woken up, checking how long I've been asleep"); - if (diff < interval || diff > interval * 1.01) { + if (diff < interval * 0.99 || diff > interval * 1.01) { printf("Failed!\n\t(actual: %" APR_TIME_T_FMT ", wanted: %" APR_TIME_T_FMT")\n", diff, interval); } else { |