From 9a6c0d09fb7ac906607f5fd2f4ec18d126ee5b72 Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Thu, 5 Jun 2008 16:17:11 +0000 Subject: sleep properly inbetween checks --- qooxdoo/source/class/Tr/ui/TraceTable.js | 2 +- qooxdoo/source/perl/Qooxdoo/Services/Tr.pm | 5 ++++- qooxdoo/source/translation/messages.pot | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'qooxdoo/source') diff --git a/qooxdoo/source/class/Tr/ui/TraceTable.js b/qooxdoo/source/class/Tr/ui/TraceTable.js index 3330740..446cbad 100644 --- a/qooxdoo/source/class/Tr/ui/TraceTable.js +++ b/qooxdoo/source/class/Tr/ui/TraceTable.js @@ -167,7 +167,7 @@ qx.Class.define('Tr.ui.TraceTable', var next_round = function (){Tr.Server.getInstance().callAsync( fill_table,'run_tr',{ handle: retval['handle'], point: retval['point']})}; - qx.client.Timer.once(next_round,self,sleep); + qx.client.Timer.once(next_round,self,sleep*1000); } else { self.__stop_table(); diff --git a/qooxdoo/source/perl/Qooxdoo/Services/Tr.pm b/qooxdoo/source/perl/Qooxdoo/Services/Tr.pm index 0cf88b3..1d7e192 100644 --- a/qooxdoo/source/perl/Qooxdoo/Services/Tr.pm +++ b/qooxdoo/source/perl/Qooxdoo/Services/Tr.pm @@ -22,6 +22,8 @@ sub launch { return $pid; } chdir '/' or die "Can't chdir to /: $!"; + + $|++; # unbuffer open STDOUT, ">>/tmp/tr_session.$$" or die "Can't write to /tmp/tr_session.$$: $!"; open STDIN, '/dev/null' or die "Can't read /dev/null: $!"; @@ -31,7 +33,7 @@ sub launch { my $start = time; system "traceroute","-I","-q","1",$host; my $wait = $delay - (time - $start); - if ($wait > 0){ + if ($wait > 0 and $i+1< $rounds){ print "SLEEP $wait\n"; sleep $wait; } @@ -109,6 +111,7 @@ sub method_run_tr } while ($again and $point >= $size); if (seek $fh, $point,0){ while (<$fh>){ +# print STDERR $_; waitpid($handle,WNOHANG); /^traceroute to/ && next; last unless /\n$/; # stop when we find an incomplete line diff --git a/qooxdoo/source/translation/messages.pot b/qooxdoo/source/translation/messages.pot index a99dfc3..5190ad6 100644 --- a/qooxdoo/source/translation/messages.pot +++ b/qooxdoo/source/translation/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-06-05 17:20+0200\n" +"POT-Creation-Date: 2008-06-05 18:11+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -- cgit v1.2.3-24-g4f1b