VCL_Rel(sp->vcl);
sp->vcl = NULL;
- clock_gettime(CLOCK_REALTIME, &te);
- sp->wrk->idle = te.tv_sec;
+ clock_gettime(CLOCK_REALTIME, &sp->t_end);
+ sp->wrk->idle = sp->t_end.tv_sec;
dh = cnt_dt(&sp->t_open, &sp->t_req);
dp = cnt_dt(&sp->t_req, &sp->t_resp);
da = cnt_dt(&sp->t_resp, &te);
u = crc32_2s(sp->addr, "");
v = u % CLIENT_HASH;
ch = &srcaddr_hash[v];
- now = time(NULL);
+ now = sp->t_open.tv_sec;
LOCK(&ses_mtx);
c3 = NULL;
LOCK(&stat_mtx);
ses_sum_acct(b, a);
VSL(SLT_StatAddr, 0, "%s 0 %d %ju %ju %ju %ju %ju %ju %ju",
- sp->srcaddr->addr, time(NULL) - b->first,
+ sp->srcaddr->addr, sp->t_end.tv_sec - b->first,
b->sess, b->req, b->pipe, b->pass,
b->fetch, b->hdrbytes, b->bodybytes);
VSL_stats->s_sess += a->sess;
VSL_stats->n_sess--;
ses_relsrcaddr(sp);
VSL(SLT_StatSess, sp->id, "%s %s %d %ju %ju %ju %ju %ju %ju %ju",
- sp->addr, sp->port, time(NULL) - b->first,
+ sp->addr, sp->port, sp->t_end.tv_sec - b->first,
b->sess, b->req, b->pipe, b->pass,
b->fetch, b->hdrbytes, b->bodybytes);
if (sm->workspace != params->mem_workspace) {