Return-Path: Delivered-To: apmail-apache-cvs-archive@apache.org Received: (qmail 21337 invoked by uid 500); 4 Feb 2001 03:12:49 -0000 Mailing-List: contact apache-cvs-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-cvs@apache.org Received: (qmail 21324 invoked by uid 500); 4 Feb 2001 03:12:49 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 4 Feb 2001 03:12:49 -0000 Message-ID: <20010204031249.21317.qmail@apache.org> From: stoddard@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/server/mpm/winnt mpm_winnt.c stoddard 01/02/03 19:12:49 Modified: modules/generators mod_status.c server/mpm/beos beos.c server/mpm/mpmt_beos mpmt_beos.c server/mpm/mpmt_pthread mpmt_pthread.c server/mpm/prefork prefork.c server/mpm/spmt_os2 spmt_os2.c server/mpm/winnt mpm_winnt.c Log: More mod_status work... Get Current Time, Restart Time and Server uptime displaying properly. Revision Changes Path 1.22 +5 -2 httpd-2.0/modules/generators/mod_status.c Index: mod_status.c =================================================================== RCS file: /home/cvs/httpd-2.0/modules/generators/mod_status.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- mod_status.c 2001/02/02 21:32:31 1.21 +++ mod_status.c 2001/02/04 03:12:48 1.22 @@ -177,9 +177,12 @@ ap_rprintf(r, "%.1f GB", (float) kbytes / MBYTE); } -static void show_time(request_rec *r, time_t tsecs) +static void show_time(request_rec *r, apr_time_t tsecs) { long days, hrs, mins, secs; + + /* convert apr_time_t (in micro seconds) to seconds */ + tsecs = tsecs/1000000; secs = tsecs % 60; tsecs /= 60; @@ -225,7 +228,7 @@ static int status_handler(request_rec *r) { const char *loc; - time_t nowtime = time(NULL); + apr_time_t nowtime = apr_now(); time_t up_time; int j, i, res; int ready = 0; 1.34 +2 -2 httpd-2.0/server/mpm/beos/beos.c Index: beos.c =================================================================== RCS file: /home/cvs/httpd-2.0/server/mpm/beos/beos.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- beos.c 2001/01/27 21:28:27 1.33 +++ beos.c 2001/02/04 03:12:48 1.34 @@ -97,7 +97,7 @@ static int min_spare_threads=0; static int max_spare_threads=0; static int ap_thread_limit=0; -static time_t ap_restart_time=0; +static apr_time_t ap_restart_time=0; AP_DECLARE_DATA int ap_extended_status = 0; static int num_listening_sockets = 0; /* set by open_listeners in ap_mpm_run */ static apr_socket_t ** listening_sockets; @@ -797,7 +797,7 @@ } if (!is_graceful) { - ap_restart_time = time(NULL); + ap_restart_time = apr_now(); } /* just before we go, tidy up the locks we've created to prevent a 1.60 +2 -2 httpd-2.0/server/mpm/mpmt_beos/mpmt_beos.c Index: mpmt_beos.c =================================================================== RCS file: /home/cvs/httpd-2.0/server/mpm/mpmt_beos/mpmt_beos.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -r1.59 -r1.60 --- mpmt_beos.c 2001/01/27 21:28:27 1.59 +++ mpmt_beos.c 2001/02/04 03:12:48 1.60 @@ -91,7 +91,7 @@ static int min_spare_threads=0; static int max_spare_threads=0; static int ap_daemons_limit=0; -static time_t ap_restart_time=0; +static apr_time_t ap_restart_time=0; AP_DECLARE_DATA int ap_extended_status = 0; static int workers_may_exit = 0; static int requests_this_child; @@ -809,7 +809,7 @@ "SIGHUP received. Attempting to restart"); } if (!is_graceful) { - ap_restart_time = time(NULL); + ap_restart_time = apr_now(); } delete_port(port_of_death); return 0; 1.137 +1 -1 httpd-2.0/server/mpm/mpmt_pthread/mpmt_pthread.c Index: mpmt_pthread.c =================================================================== RCS file: /home/cvs/httpd-2.0/server/mpm/mpmt_pthread/mpmt_pthread.c,v retrieving revision 1.136 retrieving revision 1.137 diff -u -r1.136 -r1.137 --- mpmt_pthread.c 2001/02/02 15:52:09 1.136 +++ mpmt_pthread.c 2001/02/04 03:12:48 1.137 @@ -1148,7 +1148,7 @@ "SIGHUP received. Attempting to restart"); } if (!is_graceful) { - ap_restart_time = time(NULL); + ap_restart_time = apr_now(); } return 0; } 1.152 +1 -1 httpd-2.0/server/mpm/prefork/prefork.c Index: prefork.c =================================================================== RCS file: /home/cvs/httpd-2.0/server/mpm/prefork/prefork.c,v retrieving revision 1.151 retrieving revision 1.152 diff -u -r1.151 -r1.152 --- prefork.c 2001/02/01 21:55:11 1.151 +++ prefork.c 2001/02/04 03:12:48 1.152 @@ -1283,7 +1283,7 @@ } if (!is_graceful) { - ap_restart_time = time(NULL); + ap_restart_time = apr_now(); } return 0; 1.74 +2 -2 httpd-2.0/server/mpm/spmt_os2/spmt_os2.c Index: spmt_os2.c =================================================================== RCS file: /home/cvs/httpd-2.0/server/mpm/spmt_os2/spmt_os2.c,v retrieving revision 1.73 retrieving revision 1.74 diff -u -r1.73 -r1.74 --- spmt_os2.c 2001/01/27 21:28:28 1.73 +++ spmt_os2.c 2001/02/04 03:12:49 1.74 @@ -90,7 +90,7 @@ static int ap_daemons_min_free=0; static int ap_daemons_max_free=0; static int ap_daemons_limit=0; -static time_t ap_restart_time=0; +static apr_time_t ap_restart_time=0; static int ap_extended_status = 0; /* @@ -1358,7 +1358,7 @@ } if (!is_graceful) { - ap_restart_time = time(NULL); + ap_restart_time = apr_now(); } return 0; 1.134 +1 -1 httpd-2.0/server/mpm/winnt/mpm_winnt.c Index: mpm_winnt.c =================================================================== RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm_winnt.c,v retrieving revision 1.133 retrieving revision 1.134 diff -u -r1.133 -r1.134 --- mpm_winnt.c 2001/02/03 21:11:34 1.133 +++ mpm_winnt.c 2001/02/04 03:12:49 1.134 @@ -1240,7 +1240,7 @@ /* Set up the scoreboard. The scoreboard in this MPM only applies to the * child process and is not shared across processes */ - ap_restart_time = time(NULL); + ap_restart_time = apr_now(); ap_create_scoreboard(pconf, SB_NOT_SHARED); /* This is the child process or we are running in single process