diff options
Diffstat (limited to 'src/http/ngx_http_log_module.c')
-rw-r--r-- | src/http/ngx_http_log_module.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/http/ngx_http_log_module.c b/src/http/ngx_http_log_module.c index 3caa2e91e..617d46a7f 100644 --- a/src/http/ngx_http_log_module.c +++ b/src/http/ngx_http_log_module.c @@ -309,11 +309,11 @@ ngx_http_log_time(ngx_http_request_t *r, u_char *buf, ngx_http_log_op_t *op) static u_char * ngx_http_log_msec(ngx_http_request_t *r, u_char *buf, ngx_http_log_op_t *op) { - struct timeval tv; + ngx_time_t *tp; - ngx_gettimeofday(&tv); + tp = ngx_timeofday(); - return ngx_sprintf(buf, "%l.%03l", tv.tv_sec, tv.tv_usec / 1000); + return ngx_sprintf(buf, "%T.%03M", tp->sec, tp->msec); } |