From 6f82c4f1701f45cbae4bce7518eb40e645e6360a Mon Sep 17 00:00:00 2001 From: djk Date: Sun, 21 Nov 1999 15:35:17 +0000 Subject: [PATCH] only refresh the screen for time every minute in console.pl --- perl/console.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; -- 2.43.0