]> err.no Git - varnish/commitdiff
Convert the last time(2) calls to TIM_real()
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 12 Jul 2007 10:13:29 +0000 (10:13 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 12 Jul 2007 10:13:29 +0000 (10:13 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1673 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_expire.c
varnish-cache/bin/varnishd/cache_fetch.c
varnish-cache/bin/varnishd/cache_main.c
varnish-cache/bin/varnishd/cache_pool.c
varnish-cache/bin/varnishd/shmlog.c

index 1a08d4ab4d95bfd4acb1440ecac5e7365ef75533..fea85ce041bce6f9a4a8f4c68962eb73731c84d6 100644 (file)
@@ -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);
index b3034f69e79c72a56f4af021ad1f958dcccd47f0..0e0a80bf2512ec10195c44c99c7190752db1df65 100644 (file)
@@ -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);
 
index 59fd4f06fb37fad3fbd0d8439039acfe7db79941..c4b3f70ce24a0efcc6274238c1c6424e3a7a9538 100644 (file)
@@ -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();
 
index 91b7054072e74806efd30e3b6d11e95be51fc6b2..e04055797925e71a64686c74da96a6481ec66ce8 100644 (file)
@@ -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));
index 37a93b019a1daf7836ccda9687d176305e4eb920..7e11cee54b0ced4fc52fdb9e828d55c78774151b 100644 (file)
@@ -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);
 }