X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=056402b9501257fc410ba747e72bfb3e49949e9b;hb=363839f98405239478bbe5a85efad1d679a1c722;hp=c26016ee5048ce9205175a484ae042c3be8b1b31;hpb=aa8cc0d19a7ad2cc5d8891187ceae2fba73eee2d;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index c26016ee..056402b9 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -1046,7 +1046,12 @@ sub normal for (@{$tochan->{pingtime}}) { $st += $_; } - $tochan->{pingave} = $st / @{$tochan->{pingtime}}; + if (@{$tochan->{pingtime}} == 1) { + $tochan->{pingave} = $t; + } else { + $tochan->{pingave} = $tochan->{pingave} + (($t - $tochan->{pingave}) / 8); + } +# $tochan->{pingave} = $st / @{$tochan->{pingtime}}; } } }