#include <ngx_config.h>
#include <ngx_core.h>
static ngx_msec_t ngx_monotonic_time(time_t sec, ngx_uint_t msec);
#define NGX_TIME_SLOTS …
static ngx_uint_t slot;
static ngx_atomic_t ngx_time_lock;
volatile ngx_msec_t ngx_current_msec;
volatile ngx_time_t *ngx_cached_time;
volatile ngx_str_t ngx_cached_err_log_time;
volatile ngx_str_t ngx_cached_http_time;
volatile ngx_str_t ngx_cached_http_log_time;
volatile ngx_str_t ngx_cached_http_log_iso8601;
volatile ngx_str_t ngx_cached_syslog_time;
#if !(NGX_WIN32)
static ngx_int_t cached_gmtoff;
#endif
static ngx_time_t cached_time[NGX_TIME_SLOTS];
static u_char cached_err_log_time[NGX_TIME_SLOTS]
[sizeof("1970/09/28 12:00:00")];
static u_char cached_http_time[NGX_TIME_SLOTS]
[sizeof("Mon, 28 Sep 1970 06:00:00 GMT")];
static u_char cached_http_log_time[NGX_TIME_SLOTS]
[sizeof("28/Sep/1970:12:00:00 +0600")];
static u_char cached_http_log_iso8601[NGX_TIME_SLOTS]
[sizeof("1970-09-28T12:00:00+06:00")];
static u_char cached_syslog_time[NGX_TIME_SLOTS]
[sizeof("Sep 28 12:00:00")];
static char *week[] = …;
static char *months[] = …;
void
ngx_time_init(void)
{ … }
void
ngx_time_update(void)
{ … }
static ngx_msec_t
ngx_monotonic_time(time_t sec, ngx_uint_t msec)
{ … }
#if !(NGX_WIN32)
void
ngx_time_sigsafe_update(void)
{ … }
#endif
u_char *
ngx_http_time(u_char *buf, time_t t)
{ … }
u_char *
ngx_http_cookie_time(u_char *buf, time_t t)
{ … }
void
ngx_gmtime(time_t t, ngx_tm_t *tp)
{ … }
time_t
ngx_next_time(time_t when)
{ … }