Mercurial > hg > nginx
comparison src/core/ngx_times.c @ 271:e16dfb9b9afa
nginx-0.0.2-2004-02-26-20:10:01 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 26 Feb 2004 17:10:01 +0000 |
parents | 7bb9562216ce |
children | 87e73f067470 |
comparison
equal
deleted
inserted
replaced
270:7bb9562216ce | 271:e16dfb9b9afa |
---|---|
75 if (ngx_cached_time == s) { | 75 if (ngx_cached_time == s) { |
76 return; | 76 return; |
77 } | 77 } |
78 | 78 |
79 #if (NGX_THREADS) | 79 #if (NGX_THREADS) |
80 if (ngx_time_mutex) { | 80 if (ngx_mutex_trylock(ngx_time_mutex) != NGX_OK) { |
81 if (ngx_mutex_trylock(ngx_time_mutex) != NGX_OK) { | 81 return; |
82 return; | |
83 } | |
84 } | 82 } |
85 #endif | 83 #endif |
86 | 84 |
87 ngx_cached_time = s; | 85 ngx_cached_time = s; |
88 | 86 |
117 tm.ngx_tm_hour, | 115 tm.ngx_tm_hour, |
118 tm.ngx_tm_min, | 116 tm.ngx_tm_min, |
119 tm.ngx_tm_sec); | 117 tm.ngx_tm_sec); |
120 | 118 |
121 #if (NGX_THREADS) | 119 #if (NGX_THREADS) |
122 if (ngx_time_mutex) { | 120 ngx_mutex_unlock(ngx_time_mutex); |
123 ngx_mutex_unlock(ngx_time_mutex); | |
124 } | |
125 #endif | 121 #endif |
126 | 122 |
127 } | 123 } |
128 | 124 |
129 | 125 |