Mercurial > hg > nginx-quic
comparison src/http/ngx_http_file_cache.c @ 3474:d4c4cfdffe30
*) use previously cached GMT offset value to update time from a signal handler
*) change ngx_time_update() interface since there are no notification methods
those return time
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sat, 13 Mar 2010 18:08:07 +0000 |
parents | bbea0b19b608 |
children | ab353d7dc182 |
comparison
equal
deleted
inserted
replaced
3473:0299cf5856fc | 3474:d4c4cfdffe30 |
---|---|
1214 { | 1214 { |
1215 ngx_msec_t elapsed; | 1215 ngx_msec_t elapsed; |
1216 | 1216 |
1217 if (cache->files++ > 100) { | 1217 if (cache->files++ > 100) { |
1218 | 1218 |
1219 ngx_time_update(0, 0); | 1219 ngx_time_update(0); |
1220 | 1220 |
1221 elapsed = ngx_abs((ngx_msec_int_t) (ngx_current_msec - cache->last)); | 1221 elapsed = ngx_abs((ngx_msec_int_t) (ngx_current_msec - cache->last)); |
1222 | 1222 |
1223 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0, | 1223 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0, |
1224 "http file cache manager time: %M", elapsed); | 1224 "http file cache manager time: %M", elapsed); |
1231 * therefore sleep 200ms | 1231 * therefore sleep 200ms |
1232 */ | 1232 */ |
1233 | 1233 |
1234 ngx_msleep(200); | 1234 ngx_msleep(200); |
1235 | 1235 |
1236 ngx_time_update(0, 0); | 1236 ngx_time_update(0); |
1237 } | 1237 } |
1238 | 1238 |
1239 cache->last = ngx_current_msec; | 1239 cache->last = ngx_current_msec; |
1240 cache->files = 0; | 1240 cache->files = 0; |
1241 } | 1241 } |