X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fconsole.pl;h=f4c4a85fa37731c163379cdf3b21b9b84d609b35;hb=ec57aa982f870daf09a1fc7839d06e52980cfb55;hp=46e7a1ea6c1df7c9c8eb4e2ba09f43edd26892cc;hpb=87357f58ecea93ac49f2b2cd894b1e54a4a4035f;p=spider.git diff --git a/perl/console.pl b/perl/console.pl index 46e7a1ea..f4c4a85f 100755 --- a/perl/console.pl +++ b/perl/console.pl @@ -32,6 +32,7 @@ use DXDebug; use DXUtil; use DXDebug; use IO::File; +use Time::HiRes qw(gettimeofday tv_interval); use Curses 1.06; use Console; @@ -50,6 +51,9 @@ $connsort = "local"; $khistpos = 0; $spos = $pos = $lth = 0; $inbuf = ""; +@time = (); + +$SIG{WINCH} = sub {@time = gettimeofday}; sub mydbg { @@ -114,8 +118,6 @@ sub do_resize $has_colors = has_colors(); do_initscr(); - $winch = 0; - $SIG{'WINCH'} = sub {$winch = 1}; show_screen(); } @@ -504,7 +506,7 @@ for (;;) { $lasttime = $t; } my $ch = $bot->getch(); - if ($winch) { + if (@time && tv_interval(\@time, [gettimeofday]) >= 1) { # mydbg("Got Resize"); # do_resize(); next;