From 91ae291402558879346938651555e538abeed6c7 Mon Sep 17 00:00:00 2001 From: Seth Mos Date: Wed, 24 Dec 2008 08:42:24 +0000 Subject: Restore humantime algorithm --- usr/local/www/status_rrd_graph_img.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr') diff --git a/usr/local/www/status_rrd_graph_img.php b/usr/local/www/status_rrd_graph_img.php index af6441f..8322bbe 100644 --- a/usr/local/www/status_rrd_graph_img.php +++ b/usr/local/www/status_rrd_graph_img.php @@ -183,10 +183,10 @@ function humantime($timestamp){ for($j = 0; $difference >= $lengths[$j]; $j++) { $difference /= $lengths[$j]; $difference = round($difference); - if($difference != 1) { - $periods[$j].= "s"; - $text = "$difference $periods[$j]"; - } + } + if($difference != 1) { + $periods[$j].= "s"; + $text = "$difference $periods[$j]"; } return $text; } -- cgit v1.1