Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
1639:7d125a707158 | 1640:02a22cd5282a |
---|---|
398 ngx_time_t *tp; | 398 ngx_time_t *tp; |
399 ngx_msec_int_t ms; | 399 ngx_msec_int_t ms; |
400 | 400 |
401 tp = ngx_timeofday(); | 401 tp = ngx_timeofday(); |
402 | 402 |
403 ms = (tp->sec - r->start_sec) * 1000 + (tp->msec - r->start_msec); | 403 ms = (ngx_msec_int_t) |
404 ((tp->sec - r->start_sec) * 1000 + (tp->msec - r->start_msec)); | |
404 ms = (ms >= 0) ? ms : 0; | 405 ms = (ms >= 0) ? ms : 0; |
405 | 406 |
406 return ngx_sprintf(buf, "%T.%03M", ms / 1000, ms % 1000); | 407 return ngx_sprintf(buf, "%T.%03M", ms / 1000, ms % 1000); |
407 } | 408 } |
408 | 409 |