From: phk Date: Thu, 12 Jul 2007 10:13:29 +0000 (+0000) Subject: Convert the last time(2) calls to TIM_real() X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3adc956349b73c31df6cf9b9b30adb984117c278;p=varnish Convert the last time(2) calls to TIM_real() git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1673 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_expire.c b/varnish-cache/bin/varnishd/cache_expire.c index 1a08d4ab..fea85ce0 100644 --- a/varnish-cache/bin/varnishd/cache_expire.c +++ b/varnish-cache/bin/varnishd/cache_expire.c @@ -127,7 +127,7 @@ exp_hangman(void *arg) if (o == NULL) { UNLOCK(&exp_mtx); AZ(sleep(1)); - t = time(NULL); + t = TIM_real(); continue; } TAILQ_REMOVE(&exp_deathrow, o, deathrow); @@ -178,7 +178,7 @@ exp_prefetch(void *arg) UNLOCK(&exp_mtx); AZ(sleep(1)); VCL_Refresh(&sp->vcl); - t = time(NULL); + t = TIM_real(); continue; } binheap_delete(exp_heap, o->heap_idx); diff --git a/varnish-cache/bin/varnishd/cache_fetch.c b/varnish-cache/bin/varnishd/cache_fetch.c index b3034f69..0e0a80bf 100644 --- a/varnish-cache/bin/varnishd/cache_fetch.c +++ b/varnish-cache/bin/varnishd/cache_fetch.c @@ -303,7 +303,7 @@ Fetch(struct sess *sp) CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC); - sp->obj->entered = time(NULL); + sp->obj->entered = TIM_real(); assert(sp->obj->busy != 0); diff --git a/varnish-cache/bin/varnishd/cache_main.c b/varnish-cache/bin/varnishd/cache_main.c index 59fd4f06..c4b3f70c 100644 --- a/varnish-cache/bin/varnishd/cache_main.c +++ b/varnish-cache/bin/varnishd/cache_main.c @@ -71,7 +71,7 @@ child_main(void) stevedore->open(stevedore); printf("Ready\n"); - VSL_stats->start_time = time(NULL); + VSL_stats->start_time = TIM_real(); CLI_Init(); diff --git a/varnish-cache/bin/varnishd/cache_pool.c b/varnish-cache/bin/varnishd/cache_pool.c index 91b70540..e0405579 100644 --- a/varnish-cache/bin/varnishd/cache_pool.c +++ b/varnish-cache/bin/varnishd/cache_pool.c @@ -207,7 +207,7 @@ wrk_thread(void *priv) w = &ww; memset(w, 0, sizeof *w); w->magic = WORKER_MAGIC; - w->idle = time(NULL); + w->idle = TIM_real(); w->wlp = w->wlog; w->wle = w->wlog + sizeof w->wlog; AZ(pipe(w->pipe)); diff --git a/varnish-cache/bin/varnishd/shmlog.c b/varnish-cache/bin/varnishd/shmlog.c index 37a93b01..7e11cee5 100644 --- a/varnish-cache/bin/varnishd/shmlog.c +++ b/varnish-cache/bin/varnishd/shmlog.c @@ -289,7 +289,7 @@ VSL_Init(void) /* XXX more check sanity of loghead ? */ logstart = (unsigned char *)loghead + loghead->start; MTX_INIT(&vsl_mtx); - loghead->starttime = time(NULL); + loghead->starttime = TIM_real(); memset(VSL_stats, 0, sizeof *VSL_stats); }