Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The result I get back for $duration * 1000 is either 0 or 1000 ms. The problem is, the host I'm using has an average ping time of 127ms, so something just isn't adding up. Am I missing something?while ( 1 ) { my $ret; my $duration; my $ip; ( $ret, $duration, $ip ) = $p->ping( $host, 5.5 ); printf( "$host [ip: $ip] is alive (packet return time: %.2f ms +)\n", 1000 * $duration ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::Ping duration question
by frozenwithjoy (Priest) on Jun 21, 2012 at 05:29 UTC | |
by Anonymous Monk on Jun 21, 2012 at 06:03 UTC | |
by frozenwithjoy (Priest) on Jun 21, 2012 at 06:11 UTC | |
|
Re: Net::Ping duration question
by NetWallah (Canon) on Jun 21, 2012 at 05:34 UTC | |
by frozenwithjoy (Priest) on Jun 21, 2012 at 05:54 UTC | |
by NetWallah (Canon) on Jun 21, 2012 at 06:03 UTC | |
by frozenwithjoy (Priest) on Jun 21, 2012 at 06:08 UTC |