From: Wolfram Schneider Date: Tue, 27 Apr 2010 16:13:54 +0000 (+0200) Subject: round reliability stats X-Git-Tag: CPAN-v1.02~54^2~21^2~13 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=921d4de8eb6923be8002871a560998db2d99c224;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); }