summaryrefslogtreecommitdiff
path: root/httpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'httpd.c')
-rw-r--r--httpd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/httpd.c b/httpd.c
index d946eae..841ad4c 100644
--- a/httpd.c
+++ b/httpd.c
@@ -8,6 +8,7 @@
8#include "xs_socket.h" 8#include "xs_socket.h"
9#include "xs_httpd.h" 9#include "xs_httpd.h"
10#include "xs_mime.h" 10#include "xs_mime.h"
11#include "xs_time.h"
11 12
12#include "snac.h" 13#include "snac.h"
13 14
@@ -480,6 +481,7 @@ void httpd(void)
480 pthread_t threads[MAX_THREADS] = {0}; 481 pthread_t threads[MAX_THREADS] = {0};
481 int n_threads = 0; 482 int n_threads = 0;
482 int n; 483 int n;
484 time_t start_time = time(NULL);
483 char sem_name[24]; 485 char sem_name[24];
484 486
485 address = xs_dict_get(srv_config, "address"); 487 address = xs_dict_get(srv_config, "address");
@@ -569,5 +571,7 @@ void httpd(void)
569 sem_close(job_sem); 571 sem_close(job_sem);
570 sem_unlink(sem_name); 572 sem_unlink(sem_name);
571 573
572 srv_log(xs_fmt("httpd stop %s:%d", address, port)); 574 xs *uptime = xs_str_time_diff(time(NULL) - start_time);
575
576 srv_log(xs_fmt("httpd stop %s:%d (run time: %s)", address, port, uptime));
573} 577}