Back to home page

Nginx displayed by LXR

Source navigation ]
Diff markup ]
Identifier search ]
general search ]
 
 
Version: nginx-1.15.12 ]​[ nginx-1.16.0 ]​

0001 
0002 /*
0003  * Copyright (C) Igor Sysoev
0004  * Copyright (C) Nginx, Inc.
0005  */
0006 
0007 
0008 #ifndef _NGX_TIMES_H_INCLUDED_
0009 #define _NGX_TIMES_H_INCLUDED_
0010 
0011 
0012 #include <ngx_config.h>
0013 #include <ngx_core.h>
0014 
0015 
0016 typedef struct {
0017     time_t      sec;
0018     ngx_uint_t  msec;
0019     ngx_int_t   gmtoff;
0020 } ngx_time_t;
0021 
0022 
0023 void ngx_time_init(void);
0024 void ngx_time_update(void);
0025 void ngx_time_sigsafe_update(void);
0026 u_char *ngx_http_time(u_char *buf, time_t t);
0027 u_char *ngx_http_cookie_time(u_char *buf, time_t t);
0028 void ngx_gmtime(time_t t, ngx_tm_t *tp);
0029 
0030 time_t ngx_next_time(time_t when);
0031 #define ngx_next_time_n      "mktime()"
0032 
0033 
0034 extern volatile ngx_time_t  *ngx_cached_time;
0035 
0036 #define ngx_time()           ngx_cached_time->sec
0037 #define ngx_timeofday()      (ngx_time_t *) ngx_cached_time
0038 
0039 extern volatile ngx_str_t    ngx_cached_err_log_time;
0040 extern volatile ngx_str_t    ngx_cached_http_time;
0041 extern volatile ngx_str_t    ngx_cached_http_log_time;
0042 extern volatile ngx_str_t    ngx_cached_http_log_iso8601;
0043 extern volatile ngx_str_t    ngx_cached_syslog_time;
0044 
0045 /*
0046  * milliseconds elapsed since some unspecified point in the past
0047  * and truncated to ngx_msec_t, used in event timers
0048  */
0049 extern volatile ngx_msec_t  ngx_current_msec;
0050 
0051 
0052 #endif /* _NGX_TIMES_H_INCLUDED_ */