From 9d36511d18724cc11e818b9e63cdccdcce53bc98 Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 6 Sep 2006 18:37:17 +0000 Subject: [PATCH] Save a systemcall by using the same timestamp twice. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@925 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_acceptor.c | 1 + varnish-cache/bin/varnishd/cache_session.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_acceptor.c b/varnish-cache/bin/varnishd/cache_acceptor.c index fa77bf4a..81f6d994 100644 --- a/varnish-cache/bin/varnishd/cache_acceptor.c +++ b/varnish-cache/bin/varnishd/cache_acceptor.c @@ -66,6 +66,7 @@ vca_accept_sess(int fd) XXXAN(sp); (void)clock_gettime(CLOCK_REALTIME, &sp->t_open); + sp->acct.first = sp->t_open.tv_sec; sp->fd = i; sp->id = i; diff --git a/varnish-cache/bin/varnishd/cache_session.c b/varnish-cache/bin/varnishd/cache_session.c index d663ad28..7ec600fb 100644 --- a/varnish-cache/bin/varnishd/cache_session.c +++ b/varnish-cache/bin/varnishd/cache_session.c @@ -244,8 +244,6 @@ SES_New(struct sockaddr *addr, unsigned len) http_Setup(&sm->http, (void *)(sm + 1), sm->workspace); - sm->sess.acct.first = time(NULL); - return (&sm->sess); } -- 2.39.5