2004-09-28 04:34:51 -04:00
|
|
|
|
|
|
|
/*
|
2004-09-29 12:00:49 -04:00
|
|
|
* Copyright (C) Igor Sysoev
|
2004-09-28 04:34:51 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2003-11-10 18:09:22 -03:00
|
|
|
#ifndef _NGX_TIMES_H_INCLUDED_
|
|
|
|
#define _NGX_TIMES_H_INCLUDED_
|
|
|
|
|
|
|
|
|
|
|
|
#include <ngx_config.h>
|
|
|
|
#include <ngx_core.h>
|
|
|
|
|
|
|
|
|
2005-03-04 11:06:57 -03:00
|
|
|
void ngx_time_init(void);
|
2004-01-05 17:55:48 -03:00
|
|
|
void ngx_time_update(time_t s);
|
2004-10-21 12:34:38 -03:00
|
|
|
u_char *ngx_http_time(u_char *buf, time_t t);
|
|
|
|
u_char *ngx_http_cookie_time(u_char *buf, time_t t);
|
2003-11-13 03:14:05 -03:00
|
|
|
void ngx_gmtime(time_t t, ngx_tm_t *tp);
|
2003-11-10 18:09:22 -03:00
|
|
|
|
2004-06-27 14:01:57 -04:00
|
|
|
#if (NGX_THREADS)
|
|
|
|
ngx_int_t ngx_time_mutex_init(ngx_log_t *log);
|
|
|
|
#endif
|
|
|
|
|
2004-12-21 09:30:30 -03:00
|
|
|
#if (NGX_THREADS && (NGX_TIME_T_SIZE > NGX_SIG_ATOMIC_T_SIZE))
|
2004-06-27 14:01:57 -04:00
|
|
|
|
|
|
|
#define ngx_time() *ngx_cached_time
|
|
|
|
extern volatile time_t *ngx_cached_time;
|
2003-11-18 18:34:08 -03:00
|
|
|
|
2004-06-27 14:01:57 -04:00
|
|
|
#else
|
2003-11-10 18:09:22 -03:00
|
|
|
|
2004-06-27 14:01:57 -04:00
|
|
|
#define ngx_time() ngx_cached_time
|
2004-04-21 14:54:33 -04:00
|
|
|
extern volatile time_t ngx_cached_time;
|
2004-06-27 14:01:57 -04:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2004-06-28 12:05:02 -04:00
|
|
|
extern ngx_thread_volatile ngx_str_t ngx_cached_err_log_time;
|
|
|
|
extern ngx_thread_volatile ngx_str_t ngx_cached_http_time;
|
|
|
|
extern ngx_thread_volatile ngx_str_t ngx_cached_http_log_time;
|
2003-11-10 18:09:22 -03:00
|
|
|
|
2005-10-07 09:30:52 -04:00
|
|
|
extern ngx_int_t ngx_gmtoff;
|
2004-01-29 18:45:01 -03:00
|
|
|
|
|
|
|
/*
|
2005-10-07 09:30:52 -04:00
|
|
|
* milliseconds elapsed since epoch and truncated to ngx_msec_t,
|
|
|
|
* used in event timers
|
2004-01-29 18:45:01 -03:00
|
|
|
*/
|
2005-10-07 09:30:52 -04:00
|
|
|
extern ngx_msec_t ngx_current_time;
|
2004-01-29 18:45:01 -03:00
|
|
|
|
2003-11-10 18:09:22 -03:00
|
|
|
|
|
|
|
#endif /* _NGX_TIMES_H_INCLUDED_ */
|