httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject Re: [PATCH] ab cleanups...
Date Wed, 11 Apr 2001 04:11:02 GMT
On Tue, 10 Apr 2001, Justin Erenkrantz wrote:

> +    apr_time_t starttime;  /* start time of connection in seconds since
> +                            * Jan. 1, 1970 */
> +    apr_time_t waittime;   /* Between writing request and reading
> +                            * response */
> +    apr_time_t ctime;      /* time in ms to connect */
> +    apr_time_t time;       /* time in ms for connection */

apr_time_t (64 bits) is reserved for values that represent time *in
microseconds* from Jan 1, 1970.  Time offsets in microseconds can be
represented with apr_interval_time_t (64 bits) or
apr_short_interval_time_t (32 bits).

If you want to represent absolute time or relative (interval) time in
seconds or milliseconds, you should just use apr_int64_t or apr_int32_t.

Alternatively, you could rearrange the conversions to/from microseconds in
your code so that the values are stored and manipulated in microseconds
(in which case the use of apr_time_t and apr_interval_time_t are fine) and
you don't convert to seconds/milliseconds until "the last minute" (eg,
when you go to print out the results).

Thanks,
Cliff


--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Mime
View raw message