Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 29563 invoked by uid 500); 12 Jun 2002 08:06:53 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 29534 invoked from network); 12 Jun 2002 08:06:52 -0000 Errors-To: Message-Id: <5.1.0.14.2.20020612030347.02218558@pop3.rowe-clan.net> X-Sender: wrowe%rowe-clan.net@pop3.rowe-clan.net X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Wed, 12 Jun 2002 03:06:25 -0500 To: dev@apr.apache.org, dev@httpd.apache.org From: "William A. Rowe, Jr." Subject: Re: cvs commit: apr/include apr_time.h In-Reply-To: <20020612073931.67419.qmail@icarus.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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 > > >