r1673 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Thu Jul 12 12:13:29 CEST 2007


Author: phk
Date: 2007-07-12 12:13:29 +0200 (Thu, 12 Jul 2007)
New Revision: 1673

Modified:
   trunk/varnish-cache/bin/varnishd/cache_expire.c
   trunk/varnish-cache/bin/varnishd/cache_fetch.c
   trunk/varnish-cache/bin/varnishd/cache_main.c
   trunk/varnish-cache/bin/varnishd/cache_pool.c
   trunk/varnish-cache/bin/varnishd/shmlog.c
Log:
Convert the last time(2) calls to TIM_real()


Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_expire.c	2007-07-12 10:00:13 UTC (rev 1672)
+++ trunk/varnish-cache/bin/varnishd/cache_expire.c	2007-07-12 10:13:29 UTC (rev 1673)
@@ -127,7 +127,7 @@
 		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 @@
 			UNLOCK(&exp_mtx);
 			AZ(sleep(1));
 			VCL_Refresh(&sp->vcl);
-			t = time(NULL);
+			t = TIM_real();
 			continue;
 		}
 		binheap_delete(exp_heap, o->heap_idx);

Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_fetch.c	2007-07-12 10:00:13 UTC (rev 1672)
+++ trunk/varnish-cache/bin/varnishd/cache_fetch.c	2007-07-12 10:13:29 UTC (rev 1673)
@@ -303,7 +303,7 @@
 	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);
 

Modified: trunk/varnish-cache/bin/varnishd/cache_main.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_main.c	2007-07-12 10:00:13 UTC (rev 1672)
+++ trunk/varnish-cache/bin/varnishd/cache_main.c	2007-07-12 10:13:29 UTC (rev 1673)
@@ -71,7 +71,7 @@
 		stevedore->open(stevedore);
 
 	printf("Ready\n");
-	VSL_stats->start_time = time(NULL);
+	VSL_stats->start_time = TIM_real();
 
 	CLI_Init();
 

Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pool.c	2007-07-12 10:00:13 UTC (rev 1672)
+++ trunk/varnish-cache/bin/varnishd/cache_pool.c	2007-07-12 10:13:29 UTC (rev 1673)
@@ -207,7 +207,7 @@
 	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));

Modified: trunk/varnish-cache/bin/varnishd/shmlog.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/shmlog.c	2007-07-12 10:00:13 UTC (rev 1672)
+++ trunk/varnish-cache/bin/varnishd/shmlog.c	2007-07-12 10:13:29 UTC (rev 1673)
@@ -289,7 +289,7 @@
 	/* 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);
 }
 




More information about the varnish-commit mailing list