view src/core/ngx_times.h @ 4:4b2dafa26fe2 NGINX_0_1_2

nginx 0.1.2 *) Feature: the --user=USER, --group=GROUP, and --with-ld-opt=OPTIONS options in configure. *) Feature: the server_name directive supports *.domain.tld. *) Bugfix: the portability improvements. *) Bugfix: if configuration file was set in command line, the reconfiguration was impossible; bug appeared in 0.1.1. *) Bugfix: proxy module may get caught in an endless loop when sendfile is not used. *) Bugfix: with sendfile the response was not recoded according to the charset module directives; bug appeared in 0.1.1. *) Bugfix: very seldom bug in the kqueue processing. *) Bugfix: the gzip module compressed the proxied responses that was already compressed.
author Igor Sysoev <http://sysoev.ru>
date Thu, 21 Oct 2004 00:00:00 +0400
parents f0b350454894
children 45fe5b98a9de
line wrap: on
line source


/*
 * Copyright (C) Igor Sysoev
 */


#ifndef _NGX_TIMES_H_INCLUDED_
#define _NGX_TIMES_H_INCLUDED_


#include <ngx_config.h>
#include <ngx_core.h>


void ngx_time_init();
void ngx_time_update(time_t s);
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);

#if (NGX_THREADS)
ngx_int_t ngx_time_mutex_init(ngx_log_t *log);
#endif

#if (NGX_THREADS && (TIME_T_SIZE > SIG_ATOMIC_T_SIZE))

#define ngx_time()        *ngx_cached_time
extern volatile time_t    *ngx_cached_time;

#else

#define ngx_time()         ngx_cached_time
extern volatile time_t     ngx_cached_time;

#endif


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;

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;



#endif /* _NGX_TIMES_H_INCLUDED_ */