From ebdaee8fe3073df9b3b8ee2125ab2d35fd9b2877 Mon Sep 17 00:00:00 2001 From: petter Date: Thu, 26 Feb 2009 13:36:44 +0000 Subject: [PATCH] $delta_time should never be 0, but just in case... git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3831 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-tools/webgui/Varnish/Statistics.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/varnish-tools/webgui/Varnish/Statistics.pm b/varnish-tools/webgui/Varnish/Statistics.pm index 589fddb4..fc6cf78d 100644 --- a/varnish-tools/webgui/Varnish/Statistics.pm +++ b/varnish-tools/webgui/Varnish/Statistics.pm @@ -159,7 +159,12 @@ use Varnish::DB; } } else { - $delta_value = ($value - $last_value) / $delta_time; + if ($delta_time > 0) { + $delta_value = ($value - $last_value) / $delta_time; + } + else { + $delta_value = undef; + } } $last_value = $value; -- 2.39.5