From: djk Date: Sun, 21 Nov 1999 15:35:17 +0000 (+0000) Subject: only refresh the screen for time every minute in console.pl X-Git-Tag: R_1_35~9 X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=commitdiff_plain;h=6f82c4f1701f45cbae4bce7518eb40e645e6360a only refresh the screen for time every minute in console.pl --- diff --git a/perl/console.pl b/perl/console.pl index 594bc67e..8f028aa7 100755 --- a/perl/console.pl +++ b/perl/console.pl @@ -430,12 +430,17 @@ $conn->send_now("I$call|set/nobeep"); Msg->set_event_handler(\*STDIN, "read" => \&rec_stdin); +my $lastmin = 0; for (;;) { my $t; Msg->event_loop(1, 1); $t = time; if ($t > $lasttime) { - show_screen(); + my ($min)= (gmtime($t))[1]; + if ($min != $lastmin) { + show_screen(); + $lastmin = $min; + } $lasttime = $t; } $top->refresh() if $top->is_wintouched;