apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: apr/test testsleep.c
Date Wed, 02 Jan 2002 23:04:29 GMT
jerenkrantz    02/01/02 15:04:29

  Modified:    test     testsleep.c
  Log:
  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
  
  Revision  Changes    Path
  1.4       +1 -1      apr/test/testsleep.c
  
  Index: testsleep.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testsleep.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- testsleep.c	2 Jan 2002 22:47:56 -0000	1.3
  +++ testsleep.c	2 Jan 2002 23:04:29 -0000	1.4
  @@ -77,7 +77,7 @@
       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 {
  
  
  

Mime
View raw message