From be2e653cbadecabbd5e09394fa7c60136eabae5b Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 11 Aug 2011 07:00:30 +0000 Subject: OK sleep does not block other threads --- loadbars.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/loadbars.pl b/loadbars.pl index 3b75e0e..c22ba85 100755 --- a/loadbars.pl +++ b/loadbars.pl @@ -119,7 +119,7 @@ BASH my $pid = open my $pipe, "$cmd |" or do { say "Warning: $!"; - sleep 1; + sleep 3; next; }; @@ -471,8 +471,9 @@ sub main_loop ($@) { # Display an informational text message if any $app->print(0, $y+=$space, $displayinfo) if length $displayinfo; - $app->update($_) for $rect_nice, $rect_iowait, $rect_system, $rect_user; + $app->update($rect_nice, $rect_iowait, $rect_system, $rect_user); $app->update($rect_separator) if defined $rect_separator; + $x += $width + 1; } -- cgit v1.2.3