diff src/http/modules/ngx_http_log_module.c @ 1640:02a22cd5282a

64-bit time_t compatibility
author Igor Sysoev <igor@sysoev.ru>
date Thu, 15 Nov 2007 14:26:36 +0000
parents bb662e047a21
children 66dc85397a90
line wrap: on
line diff
--- a/src/http/modules/ngx_http_log_module.c
+++ b/src/http/modules/ngx_http_log_module.c
@@ -400,7 +400,8 @@ ngx_http_log_request_time(ngx_http_reque
 
     tp = ngx_timeofday();
 
-    ms = (tp->sec - r->start_sec) * 1000 + (tp->msec - r->start_msec);
+    ms = (ngx_msec_int_t)
+             ((tp->sec - r->start_sec) * 1000 + (tp->msec - r->start_msec));
     ms = (ms >= 0) ? ms : 0;
 
     return ngx_sprintf(buf, "%T.%03M", ms / 1000, ms % 1000);