summaryrefslogtreecommitdiff
path: root/example/ivymainloop.pl
diff options
context:
space:
mode:
authormertz2004-03-31 14:09:42 +0000
committermertz2004-03-31 14:09:42 +0000
commit1bd1e6347c68c51a2134c774108fd126930c97b6 (patch)
tree0701906f1d83dce736f5883a13cc6c785c623464 /example/ivymainloop.pl
parent240a92b236d6c8a15532c60d2c6632e0364ad4cb (diff)
downloadivy-perl-1bd1e6347c68c51a2134c774108fd126930c97b6.zip
ivy-perl-1bd1e6347c68c51a2134c774108fd126930c97b6.tar.gz
ivy-perl-1bd1e6347c68c51a2134c774108fd126930c97b6.tar.bz2
ivy-perl-1bd1e6347c68c51a2134c774108fd126930c97b6.tar.xz
- using Time::HiRes rather than the obsolete Tim::gettimeofday
Diffstat (limited to 'example/ivymainloop.pl')
-rw-r--r--example/ivymainloop.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/example/ivymainloop.pl b/example/ivymainloop.pl
index 3c21962..44ac5e8 100644
--- a/example/ivymainloop.pl
+++ b/example/ivymainloop.pl
@@ -25,7 +25,7 @@ use strict;
use Ivy;
use Getopt::Long;
use Carp;
-use Time::Gettimeofday; # this module is needed by Ivy!
+use Time::HiRes;
#delay between every request asking if a distant appli is still living!
my $delay_between_living_request;
@@ -119,7 +119,7 @@ sub ask_periodic_status {
}
sub preciseTime {
- my $preciseTime = timeofday ();
+ my $preciseTime = gettimeofday();
my ($fracSeconds) = $preciseTime =~ /(\.\d*)/ ;
my ($ss, $mm, $hh) = (localtime)[0..2];
return sprintf ( "%02d:%02d:%02d.%03d", $hh,$mm,$ss,$fracSeconds*1000 );
@@ -143,7 +143,7 @@ sub yes_I_am_here {
sub reply_received {
my ($ivy, $appli_replying, $request_time, $reply_time) = @_;
my ($ss) = (localtime)[0];
- my $preciseTime = timeofday ();
+ my $preciseTime = gettimeofday();
my ($fracSeconds) = $preciseTime =~ /(\.\d*)/ ;
my $delta = $ss + $fracSeconds - $request_time;