From 11ce7318b4b78e0bd90a7e0a0c89e871bd2456b1 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Tue, 27 Apr 2010 18:13:54 +0200 Subject: [PATCH] round reliability stats --- lib/ZOOM/IRSpy/Utils.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ZOOM/IRSpy/Utils.pm b/lib/ZOOM/IRSpy/Utils.pm index 233222e..4c73adf 100644 --- a/lib/ZOOM/IRSpy/Utils.pm +++ b/lib/ZOOM/IRSpy/Utils.pm @@ -816,7 +816,7 @@ sub calc_reliability_stats { return (0, 0, 0) if $nall == 0; my @okpings = $xc->findnodes('i:status/i:probe[@ok = "1"]'); my $nok = @okpings; - my $percent = int(100*$nok/$nall); + my $percent = int(100*$nok/$nall + 0.5); return ($nok, $nall, $percent); } -- 1.7.10.4