comparison src/event/ngx_event_timer.h @ 361:446782c909b3

nginx-0.0.7-2004-06-20-23:54:15 import
author Igor Sysoev <igor@sysoev.ru>
date Sun, 20 Jun 2004 19:54:15 +0000
parents a0beefedaf94
children 780e93985b93
comparison
equal deleted inserted replaced
360:239e37d44a34 361:446782c909b3
83 * Use the previous timer value if a difference between them is less 83 * Use the previous timer value if a difference between them is less
84 * then 100 milliseconds. It allows to minimize the rbtree operations 84 * then 100 milliseconds. It allows to minimize the rbtree operations
85 * for the fast connections. 85 * for the fast connections.
86 */ 86 */
87 87
88 if (key - ev->rbtree_key < 100 / NGX_TIMER_RESOLUTION) { 88 if (abs(key - ev->rbtree_key) < 100 / NGX_TIMER_RESOLUTION) {
89 ngx_log_debug3(NGX_LOG_DEBUG_EVENT, ev->log, 0, 89 ngx_log_debug3(NGX_LOG_DEBUG_EVENT, ev->log, 0,
90 "event timer: %d, old: %d, new: %d", 90 "event timer: %d, old: %d, new: %d",
91 ngx_event_ident(ev->data), ev->rbtree_key, key); 91 ngx_event_ident(ev->data), ev->rbtree_key, key);
92 return; 92 return;
93 } 93 }