comparison src/core/ngx_times.c @ 205:4a9a2b1dd6fa

nginx-0.0.1-2003-12-04-17:53:00 import
author Igor Sysoev <igor@sysoev.ru>
date Thu, 04 Dec 2003 14:53:00 +0000
parents 8dee38ea9117
children 6e0fef527732
comparison
equal deleted inserted replaced
204:e0bcfb77d6c7 205:4a9a2b1dd6fa
1 1
2 #include <ngx_config.h> 2 #include <ngx_config.h>
3 #include <ngx_core.h> 3 #include <ngx_core.h>
4 4
5 5
6 time_t ngx_cached_time; 6 time_t ngx_cached_time;
7 ngx_epoch_msec_t ngx_elapsed_msec;
8 ngx_epoch_msec_t ngx_start_msec;
7 9
8 ngx_tm_t ngx_cached_gmtime; 10 ngx_tm_t ngx_cached_gmtime;
9 11
10 static char cached_err_log_time[] = "1970/09/28 12:00:00"; 12 static char cached_err_log_time[] = "1970/09/28 12:00:00";
11 ngx_str_t ngx_cached_err_log_time; 13 ngx_str_t ngx_cached_err_log_time;
12 14
13 static char cached_http_time[] = "Mon, 28 Sep 1970 06:00:00 GMT"; 15 static char cached_http_time[] = "Mon, 28 Sep 1970 06:00:00 GMT";
35 ngx_cached_http_time.data = cached_http_time; 37 ngx_cached_http_time.data = cached_http_time;
36 ngx_cached_http_log_time.data = cached_http_log_time; 38 ngx_cached_http_log_time.data = cached_http_log_time;
37 39
38 ngx_gettimeofday(&tv); 40 ngx_gettimeofday(&tv);
39 ngx_cached_time = tv.tv_sec; 41 ngx_cached_time = tv.tv_sec;
42 ngx_start_msec = tv.tv_sec * 1000 + tv.tv_usec / 1000;
43 ngx_elapsed_msec = 0;
44
40 ngx_time_update(); 45 ngx_time_update();
41 } 46 }
42 47
43 48
44 void ngx_time_update() 49 void ngx_time_update()