From f163e1d84b1d2c0256984b97679cfd4a558e3918 Mon Sep 17 00:00:00 2001 From: bustico Date: Mon, 8 Feb 2010 12:21:44 +0000 Subject: fix : .ping command use new ping api (not so new in fact ...) --- example/ivyprobe.pl | 11 +++++++---- 1 file 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; } -- cgit v1.1