From: Wolfram Schneider Date: Tue, 27 Apr 2010 16:13:54 +0000 (+0200) Subject: round reliability stats X-Git-Tag: CPAN-v1.02~76^2~13 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=11ce7318b4b78e0bd90a7e0a0c89e871bd2456b1;p=irspy-moved-to-github.git round reliability stats --- 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); }