+
+ # cope with a missed ping, this means you must set the pingint large enough
+ my $miss = ($nopings-$tochan->{nopings}+1) * $tochan->{pingint};
+ if ($tochan->is_arcluster && $miss > 0 && $t > $miss && $t < $miss + $tochan->{nopings} ) {
+ $t -= $miss;
+ }
+
+ # calc smoothed RTT a la TCP
+ if (@{$tochan->{pingtime}} == 1) {
+ $tochan->{pingave} = $t;
+ } else {
+ $tochan->{pingave} = $tochan->{pingave} + (($t - $tochan->{pingave}) / 8);