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;
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;
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;
}
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
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;
"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;
"SIGHUP received. Attempting to restart");
}
if (!is_graceful) {
- ap_restart_time = time(NULL);
+ ap_restart_time = apr_now();
}
return 0;
}
}
if (!is_graceful) {
- ap_restart_time = time(NULL);
+ ap_restart_time = apr_now();
}
return 0;
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;
/*
}
if (!is_graceful) {
- ap_restart_time = time(NULL);
+ ap_restart_time = apr_now();
}
return 0;
/* 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