]> err.no Git - varnish/commitdiff
Update only once per second.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 19 Jul 2006 19:49:22 +0000 (19:49 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 19 Jul 2006 19:49:22 +0000 (19:49 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@506 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtop/varnishtop.c

index ac1d0f70afb127134ad85ae3a9d2264ce61587b8..2de0bc5f5741dce4c731a59211f37cf2eeb4f241 100644 (file)
@@ -45,6 +45,13 @@ upd(void)
        int l;
        double t = 0;
        unsigned u = 0;
+       static time_t last;
+       time_t now;
+
+       now = time(NULL);
+       if (now == last)
+               return;
+       last = now;
 
        erase();
        l = 0;