I'm trying to pre-simplify any future patch we might choose to apply for time handling. Seems like we should clean house before trying any new games with apr_time_t (including -renaming- apr_time_t and other symbols that have confused porters.)
I notice especially that server->timeout seems to be converted far to frequently to an apr_time_t. Why are we still using seconds for that field? Barring feedback that it's a "Good Thing"(tm) then I will proceed to change that field over to an apr_time_t. Bill >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 > > >
