diff options
author | Tobias Oetiker <tobi@oetiker.ch> | 2011-10-20 09:24:17 +0200 |
---|---|---|
committer | Tobias Oetiker <tobi@oetiker.ch> | 2011-10-20 09:24:17 +0200 |
commit | ccd03bfead2c62f3541a6ee944270789f18b8f38 (patch) | |
tree | f34f77413f50b5d6385acb86fc2c6fb9f1b45c15 /lib/Smokeping | |
parent | 4b4dc3a97a0b77a12ac036b4a1985f083ae11cdb (diff) | |
download | smokeping-ccd03bfead2c62f3541a6ee944270789f18b8f38.tar.gz smokeping-ccd03bfead2c62f3541a6ee944270789f18b8f38.tar.xz |
it seems some version of perl bulk at gettimeofday without ()
Diffstat (limited to 'lib/Smokeping')
-rw-r--r-- | lib/Smokeping/probes/AnotherDNS.pm | 4 | ||||
-rw-r--r-- | lib/Smokeping/probes/AnotherSSH.pm | 10 |
2 files changed, 7 insertions, 7 deletions
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; |