apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr/include apr_time.h
Date Tue, 02 Jul 2002 15:47:12 GMT
wrowe       2002/07/02 08:47:12

  Modified:    include  apr_time.h
  Log:
    Solve Jeff Trawicks nsec failure, we were truncating to 32 bits before
    performing the modulos operation.  While at it, add an apr_time_nsec
    helper for convenience.
  
  Revision  Changes    Path
  1.54      +4 -2      apr/include/apr_time.h
  
  Index: apr_time.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_time.h,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- apr_time.h	12 Jun 2002 22:23:56 -0000	1.53
  +++ apr_time.h	2 Jul 2002 15:47:12 -0000	1.54
  @@ -95,9 +95,11 @@
   /** number of microseconds per second */
   #define APR_USEC_PER_SEC APR_TIME_C(1000000)
   
  -#define apr_time_usec(time) ((apr_int32_t)(time) % APR_USEC_PER_SEC)
  +#define apr_time_usec(time) ((apr_int32_t)((time) % APR_USEC_PER_SEC))
   
  -#define apr_time_sec(time) ((apr_int64_t)(time) / APR_USEC_PER_SEC)
  +#define apr_time_nsec(time) ((apr_int32_t)((time) % APR_USEC_PER_SEC) * (apr_int32_t)1000)
  +
  +#define apr_time_sec(time) ((apr_int64_t)((time) / APR_USEC_PER_SEC))
   
   #define apr_time_from_sec(sec) ((apr_time_t)(sec) * APR_USEC_PER_SEC)
   
  
  
  

Mime
View raw message