Commit 9156803c authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Reduce number of TIM_real() calls slightly in multi socket case.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2100 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent e7fde59b
......@@ -138,6 +138,7 @@ vca_acct(void *arg)
struct pollfd *pfd;
struct listen_sock *ls;
unsigned u;
double now;
(void)arg;
......@@ -171,6 +172,7 @@ vca_acct(void *arg)
&tv_rcvtimeo, sizeof tv_rcvtimeo));
}
i = poll(pfd, heritage.nsocks, 1000);
now = TIM_real();
for (u = 0; u < heritage.nsocks; u++) {
if (pfd[u].revents == 0)
continue;
......@@ -191,7 +193,7 @@ vca_acct(void *arg)
sp->fd = i;
sp->id = i;
sp->t_open = TIM_real();
sp->t_open = now;
HTC_Init(sp->htc, sp->ws, sp->fd);
sp->step = STP_FIRST;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment