projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add french
[spider.git]
/
perl
/
console.pl
diff --git
a/perl/console.pl
b/perl/console.pl
index 46e7a1ea6c1df7c9c8eb4e2ba09f43edd26892cc..f4c4a85fa37731c163379cdf3b21b9b84d609b35 100755
(executable)
--- a/
perl/console.pl
+++ b/
perl/console.pl
@@
-32,6
+32,7
@@
use DXDebug;
use DXUtil;
use DXDebug;
use IO::File;
use DXUtil;
use DXDebug;
use IO::File;
+use Time::HiRes qw(gettimeofday tv_interval);
use Curses 1.06;
use Console;
use Curses 1.06;
use Console;
@@
-50,6
+51,9
@@
$connsort = "local";
$khistpos = 0;
$spos = $pos = $lth = 0;
$inbuf = "";
$khistpos = 0;
$spos = $pos = $lth = 0;
$inbuf = "";
+@time = ();
+
+$SIG{WINCH} = sub {@time = gettimeofday};
sub mydbg
{
sub mydbg
{
@@
-114,8
+118,6
@@
sub do_resize
$has_colors = has_colors();
do_initscr();
$has_colors = has_colors();
do_initscr();
- $winch = 0;
- $SIG{'WINCH'} = sub {$winch = 1};
show_screen();
}
show_screen();
}
@@
-504,7
+506,7
@@
for (;;) {
$lasttime = $t;
}
my $ch = $bot->getch();
$lasttime = $t;
}
my $ch = $bot->getch();
- if (
$winch
) {
+ if (
@time && tv_interval(\@time, [gettimeofday]) >= 1
) {
# mydbg("Got Resize");
# do_resize();
next;
# mydbg("Got Resize");
# do_resize();
next;