Hi,
I use Time::Hires module to get the latency of ping.
use Net::Ping;
use Time::HiRes qw( usleep gettimeofday tv_interval );
...
$p = Net::Ping->new("icmp");
for ( $r=0; $r<2; $r++){
$t0 = [gettimeofday];
$IsReachble = $p->ping($host,2);
$t1 = [gettimeofday];
last if $IsReachble;
}
my $delay_ms = sprintf ("%dms",1000* tv_interval ($t0, $t1));
$p->close();
...
Hope this helps.
Regards
Mark Zvolanek
+612 9227 0479
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs