projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altered wcy display a bit
[spider.git]
/
perl
/
watchdbg
diff --git
a/perl/watchdbg
b/perl/watchdbg
index ca3e2e3b03c134abcbd7ef6b46d0aa63f65864a3..17bb3289af9f49b58c138cee19805688e759c59e 100755
(executable)
--- a/
perl/watchdbg
+++ b/
perl/watchdbg
@@
-51,7
+51,8
@@
for (;;) {
my @now = Julian::unixtoj(time());
if ($today[1] != $now[1]) {
$fp->close;
my @now = Julian::unixtoj(time());
if ($today[1] != $now[1]) {
$fp->close;
- for (my $i = 0; $i < 20; $i++) {
+ my $i;
+ for ($i = 0; $i < 20; $i++) {
last if $fh = $fp->open(@now);
sleep 5;
}
last if $fh = $fp->open(@now);
sleep 5;
}
@@
-66,8
+67,8
@@
sub printit
my $line = shift;
my @line = split '\^', $line;
my $t = shift @line;
my $line = shift;
my @line = split '\^', $line;
my $t = shift @line;
-
my ($sec,$min,$hour) = gmtime((defined $t) ? $t : time);
-
my $buf = sprintf "%02d:%02d:%02d", $hour, $min, $sec;
+ my ($sec,$min,$hour) = gmtime((defined $t) ? $t : time);
+ my $buf = sprintf "%02d:%02d:%02d", $hour, $min, $sec;
print $buf, ' ', join('^', @line);
}
print $buf, ' ', join('^', @line);
}