# HG changeset patch # User Heiko Schlittermann (VIC) # Date 1311540188 -7200 # Node ID a508df65c738d6357803b1c9be862f13daf1efbc # Parent 129b39480dc5e6ca17d5852900c81d98a6115c49 avoid progress if there is noting to say diff -r 129b39480dc5 -r a508df65c738 cleaner --- a/cleaner Sun Jul 24 00:51:36 2011 +0200 +++ b/cleaner Sun Jul 24 22:43:08 2011 +0200 @@ -56,7 +56,8 @@ my $done = 0; local $SIG{ALRM} = sub { say sprintf "done %5.1f%% (%*d of $total)" - => 100 * $done/$total, length($total), $done; + => 100 * $done/$total, length($total), $done + if $total; alarm 5; }; $SIG{ALRM}->();