summaryrefslogtreecommitdiffstats
path: root/qooxdoo
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2008-06-05 18:17:11 +0200
committerTobi Oetiker <tobi@oetiker.ch>2008-06-05 18:17:11 +0200
commit9a6c0d09fb7ac906607f5fd2f4ec18d126ee5b72 (patch)
treef8d92db8c8b07ec6ee8497ab83af40eb56182603 /qooxdoo
parentf7c8c95ddc80c3b26f0d7978b776e02bc950a9fa (diff)
downloadsmokeping-9a6c0d09fb7ac906607f5fd2f4ec18d126ee5b72.tar.gz
smokeping-9a6c0d09fb7ac906607f5fd2f4ec18d126ee5b72.tar.xz
sleep properly inbetween checks
Diffstat (limited to 'qooxdoo')
-rw-r--r--qooxdoo/source/class/Tr/ui/TraceTable.js2
-rw-r--r--qooxdoo/source/perl/Qooxdoo/Services/Tr.pm5
-rw-r--r--qooxdoo/source/translation/messages.pot2
3 files changed, 6 insertions, 3 deletions
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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"