diff options
| author | Paul Buetow <paul@buetow.org> | 2011-08-11 07:00:30 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2011-08-11 07:00:30 +0000 |
| commit | be2e653cbadecabbd5e09394fa7c60136eabae5b (patch) | |
| tree | 7b38306f7cddf398c7ee7cc27bba25145ab99714 /loadbars.pl | |
| parent | 28ecae4bc0350c3e3ae750bf7f36758079da0ad7 (diff) | |
OK sleep does not block other threads
Diffstat (limited to 'loadbars.pl')
| -rwxr-xr-x | loadbars.pl | 5 |
1 files 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; } |
