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 Wed, 12 Jun 2002 07:39:31 GMT
wrowe       2002/06/12 00:39:31

  Modified:    include  apr_time.h
  Log:
    To simplify future, experimental work with binary usec values, these
    are suggested wrappers for common uses of APR_USEC_PER_SEC.
  
    Comments welcome.
  
  Revision  Changes    Path
  1.51      +7 -0      apr/include/apr_time.h
  
  Index: apr_time.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_time.h,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- apr_time.h	8 Jun 2002 20:04:26 -0000	1.50
  +++ apr_time.h	12 Jun 2002 07:39:31 -0000	1.51
  @@ -95,6 +95,13 @@
   /** 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_SEC(time) ((apr_int64_t)(time) / APR_USEC_PER_SEC)
  +
  +#define APR_TIME_FROM_SEC(sec) ((apr_time_t)(sec) * APR_USEC_PER_SEC)
  +
  +#define APR_TIME_MAKE(sec, usec) ((apr_time_t)(sec) * APR_USEC_PER_SEC + usec)
   
   /**
    * return the current time
  
  
  

Mime
View raw message