Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] add $unixtime to http variables

Roberto De Ioris
September 21, 2010 01:08AM
> On Mon, Sep 20, 2010 at 10:43 PM, Roberto De Ioris <roberto@unbit.it>
> wrote:
>>
>> Sorry, i think for this purpose it is betetr to use
>> r->start_sec instead of time(NULL).
>>
>> What do you think about it ?
> When I made the same patch nearly 2 years ago, I used
> ngx_cached_time->sec.
>
>

I would like to have (with the most possible accuracy) the time
when the request starts. (this will allow to reliably calculate
overload problems)

ngx_cached_time->sec can be different (oh yes we are talking about
milliseconds, but why not maintaining accuracy :) )

This is the relevant nginx code:

tp = ngx_timeofday();
r->start_sec = tp->sec;
r->start_msec = tp->msec;

#define ngx_timeofday() (ngx_time_t *) ngx_cached_time




--
Roberto De Ioris
http://unbit.it

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

[PATCH] add $unixtime to http variables

Roberto De Ioris September 20, 2010 01:44PM

Re: [PATCH] add $unixtime to http variables

Roberto De Ioris September 20, 2010 02:54PM

Re: [PATCH] add $unixtime to http variables

Boris Dolgov September 20, 2010 03:28PM

Re: [PATCH] add $unixtime to http variables

Roberto De Ioris September 21, 2010 01:08AM

Re: [PATCH] add $unixtime to http variables

Kirill A. Korinskiy September 21, 2010 03:42AM

Re: [PATCH] add $unixtime to http variables

Maxim Dounin September 21, 2010 07:32AM

Re: [PATCH] add $unixtime to http variables

Roberto De Ioris September 22, 2010 02:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 175
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready