From ccd03bfead2c62f3541a6ee944270789f18b8f38 Mon Sep 17 00:00:00 2001 From: Tobias Oetiker Date: Thu, 20 Oct 2011 09:24:17 +0200 Subject: it seems some version of perl bulk at gettimeofday without () --- lib/Smokeping/probes/AnotherDNS.pm | 4 ++-- lib/Smokeping/probes/AnotherSSH.pm | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/Smokeping/probes/AnotherDNS.pm b/lib/Smokeping/probes/AnotherDNS.pm index 185426d..48ff924 100644 --- a/lib/Smokeping/probes/AnotherDNS.pm +++ b/lib/Smokeping/probes/AnotherDNS.pm @@ -88,10 +88,10 @@ sub pingone ($) { my $timeleft = $mininterval - $elapsed; sleep $timeleft if $timeleft > 0; } - my $t0 = [gettimeofday]; + my $t0 = [gettimeofday()]; $sock->send($packet); my ($ready) = $sel->can_read($timeout); - my $t1 = [gettimeofday]; + my $t1 = [gettimeofday()]; $elapsed = tv_interval( $t0, $t1 ); if ( defined $ready ) { my $buf = ''; diff --git a/lib/Smokeping/probes/AnotherSSH.pm b/lib/Smokeping/probes/AnotherSSH.pm index c708de9..e762764 100644 --- a/lib/Smokeping/probes/AnotherSSH.pm +++ b/lib/Smokeping/probes/AnotherSSH.pm @@ -75,7 +75,7 @@ sub pingone ($) { my $t0; for ( my $run = 0 ; $run < $self->pings($target) ; $run++ ) { if (defined $t0) { - my $elapsed = tv_interval($t0, [gettimeofday]); + my $elapsed = tv_interval($t0, [gettimeofday()]); my $timeleft = $mininterval - $elapsed; sleep $timeleft if $timeleft > 0; } @@ -106,10 +106,10 @@ sub pingone ($) { my $sel = IO::Select->new( \*Socket_Handle ); # connect () and measure the Time. - $t0 = [gettimeofday]; + $t0 = [gettimeofday()]; connect( Socket_Handle, $sin ); ($ready) = $sel->can_read($timeout); - $t1 = [gettimeofday]; + $t1 = [gettimeofday()]; if(not defined $ready) { $self->do_debug("Timeout!"); @@ -131,10 +131,10 @@ sub pingone ($) { $self->do_debug("Huh? Can't write."); close(Socket_Handle); next; } - $t2 = [gettimeofday]; + $t2 = [gettimeofday()]; syswrite( Socket_Handle, $greeting . "\n" ); ($ready) = $sel->can_read($timeout); - $t3 = [gettimeofday]; + $t3 = [gettimeofday()]; if(not defined $ready) { $self->do_debug("Timeout!"); close(Socket_Handle); next; -- cgit v1.2.3-24-g4f1b