Permalink
Browse files

do_cmd_sub - max sleep time - again

  • Loading branch information...
1 parent 69547e1 commit 3b06d8da28bcb4023aaa538e30fe683699697699 @mj41 mj41 committed Apr 21, 2010
Showing with 6 additions and 2 deletions.
  1. +6 −2 bin/unrar2.pl
View
@@ -198,12 +198,16 @@ sub do_cmd_sub {
}
unless ( $done_ok ) {
- if ( $ver >= 1 ) {
+ if ( $ver >= 5 ) {
print $msg;
print " Sleeping $sleep_time s ...\n";
}
$keypress_obj->sleep_and_process_keypress( $sleep_time );
- $sleep_time = $sleep_time * $sleep_time if $sleep_time < 60*60; # one hour
+ my $max_sleep_time = 10*60; # max 10 minutes
+ if ( $sleep_time < $max_sleep_time ) {
+ $sleep_time = $sleep_time * $sleep_time;
+ $sleep_time = $max_sleep_time if $sleep_time > $max_sleep_time;
+ }
}
}

0 comments on commit 3b06d8d

Please sign in to comment.