From 5c84b43404a13a0406deb991c852b5b90391c5a8 Mon Sep 17 00:00:00 2001 From: Bill Stoddard Date: Wed, 14 Feb 2001 03:49:17 +0000 Subject: [PATCH] PR: 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 | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c index 89cea21e8c..8fb69063a7 100644 --- a/modules/generators/mod_status.c +++ b/modules/generators/mod_status.c @@ -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 -- 2.50.1