2003-11-11 05:09:22 +08:00
|
|
|
#ifndef _NGX_TIMES_H_INCLUDED_
|
|
|
|
#define _NGX_TIMES_H_INCLUDED_
|
|
|
|
|
|
|
|
|
|
|
|
#include <ngx_config.h>
|
|
|
|
#include <ngx_core.h>
|
|
|
|
|
|
|
|
|
2003-11-26 04:44:56 +08:00
|
|
|
void ngx_time_init();
|
2004-02-26 04:16:15 +08:00
|
|
|
#if (NGX_THREADS)
|
|
|
|
ngx_int_t ngx_time_mutex_init(ngx_log_t *log);
|
|
|
|
#endif
|
2004-01-06 04:55:48 +08:00
|
|
|
void ngx_time_update(time_t s);
|
2003-11-13 14:14:05 +08:00
|
|
|
size_t ngx_http_time(char *buf, time_t t);
|
|
|
|
void ngx_gmtime(time_t t, ngx_tm_t *tp);
|
2003-11-11 05:09:22 +08:00
|
|
|
|
2003-11-19 05:34:08 +08:00
|
|
|
#define ngx_time() ngx_cached_time
|
|
|
|
|
2003-11-11 05:09:22 +08:00
|
|
|
|
2003-12-04 22:53:00 +08:00
|
|
|
extern time_t ngx_cached_time;
|
|
|
|
extern ngx_str_t ngx_cached_err_log_time;
|
|
|
|
extern ngx_str_t ngx_cached_http_time;
|
|
|
|
extern ngx_str_t ngx_cached_http_log_time;
|
2003-11-11 05:09:22 +08:00
|
|
|
|
2004-01-30 05:45:01 +08:00
|
|
|
extern ngx_epoch_msec_t ngx_start_msec;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* msecs elapsed since ngx_start_msec in the current event cycle,
|
|
|
|
* used in ngx_event_add_timer() and ngx_event_find_timer()
|
|
|
|
*/
|
|
|
|
extern ngx_epoch_msec_t ngx_elapsed_msec;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* msecs elapsed since ngx_start_msec in the previous event cycle,
|
|
|
|
* used in ngx_event_expire_timers()
|
|
|
|
*/
|
|
|
|
extern ngx_epoch_msec_t ngx_old_elapsed_msec;
|
|
|
|
|
|
|
|
|
2003-11-11 05:09:22 +08:00
|
|
|
|
|
|
|
#endif /* _NGX_TIMES_H_INCLUDED_ */
|