Jeff Trawick wrote:
> Stas Bekman <[EMAIL PROTECTED]> writes:
>
>
>>The mod_status module seems to have loads of dead code, at least the
>>code for the #if HAVE_TIMES, which should go away. What's the general
>>status of this module and the scoreboard? I see that not all things
>>from 1.x are working/available yet in the new scoreboard.
>>
>
> The HAVE_TIMES code is live. At least I see that
>
> HAVE_TIMES is defined in my ap_config_auto.h
> server/scoreboard.c fills in some information when HAVE_TIMES is defined
> mod_status seems to do something with that information
oops, should have mentioned which code I was referring to.
The ifdef HAVE_TIMES part of a code snippet seems to be irrelevant
(includes my previously posted patch as well):
Index: modules/generators/mod_status.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/generators/mod_status.c,v
retrieving revision 1.54
diff -u -r1.54 mod_status.c
--- modules/generators/mod_status.c 4 Mar 2002 10:46:22 -0000 1.54
+++ modules/generators/mod_status.c 11 Mar 2002 17:04:43 -0000
@@ -558,26 +558,12 @@
ws_record = ap_scoreboard_image->servers[i][j];
ps_record = ap_scoreboard_image->parent[i];
-#if defined(NO_GETTIMEOFDAY)
-#ifdef HAVE_TIMES
- if (ws_record.start_time == (clock_t)0)
- req_time = 0L;
- else {
- req_time = ws_record.stop_time - ws_record.start_time;
- req_time = (req_time * 1000) / (int)tick;
- }
-#else
- req_time = 0L;
-#endif /* HAVE_TIMES */
-#else
- if (ws_record.start_time == 0L
- && ws_record.start_time == 0L)
+ if (ws_record.start_time == 0L)
req_time = 0L;
else
req_time = (long)
- (((ws_record.stop_time - ws_record.start_time)
* 1000)
- + ((ws_record.stop_time - ws_record.start_time)
/ 1000));
-#endif
+ ((ws_record.stop_time - ws_record.start_time) /
1000);
+
if (req_time < 0L)
req_time = 0L;
--
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/