comparison src/core/ngx_times.c @ 574:7858d4f8dec4 NGINX_0_8_39

nginx 0.8.39 *) Bugfix: an inherited "alias" directive worked incorrectly in inclusive location. *) Bugfix: in "alias" with variables and "try_files" directives combination. *) Bugfix: listen unix domain and IPv6 sockets did not inherit while online upgrade. Thanks to Maxim Dounin.
author Igor Sysoev <http://sysoev.ru>
date Mon, 31 May 2010 00:00:00 +0400
parents be4f34123024
children 8214eaef3530
comparison
equal deleted inserted replaced
573:7cbc7affef15 574:7858d4f8dec4
170 ngx_time_sigsafe_update(void) 170 ngx_time_sigsafe_update(void)
171 { 171 {
172 u_char *p; 172 u_char *p;
173 ngx_tm_t tm; 173 ngx_tm_t tm;
174 time_t sec; 174 time_t sec;
175 ngx_uint_t msec;
176 ngx_time_t *tp; 175 ngx_time_t *tp;
177 struct timeval tv; 176 struct timeval tv;
178 177
179 if (!ngx_trylock(&ngx_time_lock)) { 178 if (!ngx_trylock(&ngx_time_lock)) {
180 return; 179 return;
181 } 180 }
182 181
183 ngx_gettimeofday(&tv); 182 ngx_gettimeofday(&tv);
184 183
185 sec = tv.tv_sec; 184 sec = tv.tv_sec;
186 msec = tv.tv_usec / 1000;
187 185
188 tp = &cached_time[slot]; 186 tp = &cached_time[slot];
189 187
190 if (tp->sec == sec) { 188 if (tp->sec == sec) {
191 ngx_unlock(&ngx_time_lock); 189 ngx_unlock(&ngx_time_lock);