]> dxcluster.net Git - spider.git/commitdiff
only refresh the screen for time every minute in console.pl
authordjk <djk>
Sun, 21 Nov 1999 15:35:17 +0000 (15:35 +0000)
committerdjk <djk>
Sun, 21 Nov 1999 15:35:17 +0000 (15:35 +0000)
perl/console.pl

index 594bc67eea73c0c8762b1c6598a455616b50ba52..8f028aa7ab9d7e8b2e9bde85e2386b1f66b8caf0 100755 (executable)
@@ -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;