comparison src/event/ngx_event_timer.c @ 103:6dfda4cf5200

nginx-0.0.1-2003-06-11-19:28:34 import
author Igor Sysoev <igor@sysoev.ru>
date Wed, 11 Jun 2003 15:28:34 +0000
parents a23d010f356d
children 00bee6e7b485
comparison
equal deleted inserted replaced
102:7e86d028d8f0 103:6dfda4cf5200
1 1
2 #include <ngx_config.h> 2 #include <ngx_config.h>
3
4 #include <ngx_core.h> 3 #include <ngx_core.h>
5 #include <ngx_log.h>
6 #include <ngx_alloc.h>
7 #include <ngx_connection.h>
8 #include <ngx_event.h> 4 #include <ngx_event.h>
9
10 #include <ngx_event_timer.h>
11 5
12 6
13 static ngx_event_t *ngx_timer_queue; 7 static ngx_event_t *ngx_timer_queue;
14 static int ngx_timer_cur_queue; 8 static int ngx_timer_cur_queue;
15 static int ngx_timer_queue_num; 9 static int ngx_timer_queue_num;
47 void ngx_event_add_timer(ngx_event_t *ev, ngx_msec_t timer) 41 void ngx_event_add_timer(ngx_event_t *ev, ngx_msec_t timer)
48 { 42 {
49 ngx_event_t *e; 43 ngx_event_t *e;
50 44
51 #if (NGX_DEBUG_EVENT) 45 #if (NGX_DEBUG_EVENT)
52 ngx_connection_t *c = (ngx_connection_t *) ev->data; 46 ngx_connection_t *c = ev->data;
53 ngx_log_debug(ev->log, "set timer: %d:%d, slot: %d" _ 47 ngx_log_debug(ev->log, "set timer: %d:%d, slot: %d" _
54 c->fd _ timer _ ngx_timer_cur_queue); 48 c->fd _ timer _ ngx_timer_cur_queue);
55 #endif 49 #endif
56 50
57 if (ev->timer_next || ev->timer_prev) { 51 if (ev->timer_next || ev->timer_prev) {