httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: apr/include apr_time.h
Date Fri, 16 Feb 2001 01:37:58 GMT
On Fri, Feb 16, 2001 at 12:40:01AM -0000, rbb@apache.org wrote:
>...
>   --- mod_status.c	2001/02/15 19:22:02	1.28
>   +++ mod_status.c	2001/02/16 00:39:59	1.29
>   @@ -184,7 +184,7 @@
>    
>    static void show_time(request_rec *r, apr_interval_time_t tsecs)

apr_interval_time_t is in microseconds, not seconds. This is still an
inappropriate type here (semantics-wise). OtherBill will be upset :-)

Using an apr_uint32_t, like FirstBill had, was a good choice.

>...
>   --- mod_unique_id.c	2001/02/10 22:21:23	1.26
>   +++ mod_unique_id.c	2001/02/16 00:40:00	1.27
>   @@ -182,7 +182,7 @@
>    #endif
>        char str[MAXHOSTNAMELEN + 1];
>        struct hostent *hent;
>   -    apr_interval_time_t pause;
>   +    apr_short_interval_time_t pause;
>    
>        /*
>         * Calculate the sizes and offsets in cur_unique_id.
>   @@ -243,7 +243,7 @@
>         * But protecting against it is relatively cheap.  We just sleep into the
>         * next second.
>         */
>   -    pause = (apr_interval_time_t)(1000000 - (apr_time_now() % APR_USEC_PER_SEC));
>   +    pause = (apr_short_interval_time_t)(1000000 - (apr_time_now() % APR_USEC_PER_SEC));
>        apr_sleep(pause);

What is this change for?

apr_sleep() takes an apr_interval_time_t, so switching this to a short
interval isn't quite right.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message