From: Jeff Trawick Date: Wed, 13 Mar 2002 12:40:59 +0000 (+0000) Subject: fix the calculation of request time in mod_status X-Git-Tag: CHANGES~80 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5baa83e59f07eaa8d01e8e487a97cda3c7173eef;p=apache fix the calculation of request time in mod_status (currently nobody sets the start/stop times so this fix isn't immediately apparent) Submitted by: Stas Bekman Reviewed by: Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93901 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index c8c4a65b0f..ec24f8a8dc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,7 @@ Changes with Apache 2.0.34-dev + *) Fix the calculation of request time in mod_status. [Stas Bekman] + *) Fix the calculation of thread_num in the worker score structure. [Stas Bekman] diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c index 9cb2dfc632..ce6d5bead7 100644 --- a/modules/generators/mod_status.c +++ b/modules/generators/mod_status.c @@ -570,13 +570,11 @@ static int status_handler(request_rec *r) 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)); + ((ws_record.stop_time - ws_record.start_time) / 1000); #endif if (req_time < 0L) req_time = 0L;