diff options
author | bustico | 2010-02-08 12:21:44 +0000 |
---|---|---|
committer | bustico | 2010-02-08 12:21:44 +0000 |
commit | f163e1d84b1d2c0256984b97679cfd4a558e3918 (patch) | |
tree | a44ff5c944c27745d6d790e80bf2e462f0187842 | |
parent | 9151aab5dca0f49d389a7fa6063276f25a2bdb62 (diff) | |
download | ivy-perl-f163e1d84b1d2c0256984b97679cfd4a558e3918.zip ivy-perl-f163e1d84b1d2c0256984b97679cfd4a558e3918.tar.gz ivy-perl-f163e1d84b1d2c0256984b97679cfd4a558e3918.tar.bz2 ivy-perl-f163e1d84b1d2c0256984b97679cfd4a558e3918.tar.xz |
fix : .ping command use new ping api (not so new in fact ...)
-rwxr-xr-x | example/ivyprobe.pl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/example/ivyprobe.pl b/example/ivyprobe.pl index ba095df..1ec8449 100755 --- a/example/ivyprobe.pl +++ b/example/ivyprobe.pl @@ -239,12 +239,15 @@ sub interpret_line { return 0; } - if ($str =~ /^.p(ing)?\s+(\S+)\s+(\d+)\s*$/) { + if ($str =~ /^.p(ing)?\s+(\S+)\s*$/) { my $appname = $2; - my $timeout = $3; &printtime; - print "ping $appname timeout=$timeout\n"; - my $res = $Ivyobj->ping($appname, $timeout); + print "ping $appname\n"; + my $res = $Ivyobj->ping($appname, sub { + my ($time, $name) = @_; + printf ("pong from ${appname}[$name] time=%.2f ms\n", $time); + } + ); print "$res\n"; return 0; } |