]> granicus.if.org Git - apache/commitdiff
fix the calculation of request time in mod_status
authorJeff Trawick <trawick@apache.org>
Wed, 13 Mar 2002 12:40:59 +0000 (12:40 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 13 Mar 2002 12:40:59 +0000 (12:40 +0000)
(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

CHANGES
modules/generators/mod_status.c

diff --git a/CHANGES b/CHANGES
index c8c4a65b0f12c9f6d56c0a4bda0bd4d3c5946f32..ec24f8a8dca8e7febc6d0bd6e56772da0f29cc68 100644 (file)
--- 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]
 
index 9cb2dfc6322ba9c2013a49ef8e9971aa70f75d9d..ce6d5bead7a7484ccd18e105e4ef47c3ebf5c3d8 100644 (file)
@@ -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;