summaryrefslogtreecommitdiff
path: root/example/ivymainloop.pl
diff options
context:
space:
mode:
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;