]> granicus.if.org Git - apache/commitdiff
PR:
authorBill Stoddard <stoddard@apache.org>
Wed, 14 Feb 2001 03:49:17 +0000 (03:49 +0000)
committerBill Stoddard <stoddard@apache.org>
Wed, 14 Feb 2001 03:49:17 +0000 (03:49 +0000)
Obtained from:
Submitted by:
Get req/sec and bytes/sec status reporting working. Still lots of type
warnings but this is a bit better than before.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88152 13f79535-47bb-0310-9956-ffa450edef68

modules/generators/mod_status.c

index 89cea21e8c5b87a6d6367a71e041269d8ec981ea..8fb69063a7beca9b31dd47361d8f94d78cd34964 100644 (file)
@@ -182,13 +182,10 @@ static void format_kbyte_out(request_rec *r, unsigned long kbytes)
        ap_rprintf(r, "%.1f GB", (float) kbytes / MBYTE);
 }
 
-static void show_time(request_rec *r, apr_time_t tsecs) 
+static void show_time(request_rec *r, apr_uint32_t tsecs) 
 {
-    long days, hrs, mins, secs;
+    apr_uint32_t days, hrs, mins, secs;
     
-    /* convert apr_time_t (in micro seconds) to seconds */
-    tsecs = tsecs/1000000;
-
     secs = tsecs % 60;
     tsecs /= 60;
     mins = tsecs % 60;
@@ -234,7 +231,7 @@ static int status_handler(request_rec *r)
 {
     const char *loc;
     apr_time_t nowtime = apr_time_now();
-    time_t up_time;
+    apr_uint32_t up_time;
     int j, i, res;
     int ready = 0;
     int busy = 0;
@@ -351,7 +348,8 @@ static int status_handler(request_rec *r)
         }
     }
 
-    up_time = nowtime - ap_restart_time;
+    /* up_time in seconds */
+    up_time = (apr_uint32_t) ((nowtime - ap_restart_time)/1000000);
 
     if (!short_report) {
        ap_rputs(DOCTYPE_HTML_3_2