Crier allows all kinds of progress indicators, but it would be nice to have ones that would automatically deal with percentages and elapsed time.
1) Elapsed time -- Display progress indicator if and only if an amount of time has elapsed.
$cry->timed_prog(".");
# displays "." only if the default amount of time has passed since the last display
$cry->timed_over($count, { elapsed => 2 });
# displays "." only if 2 seconds have passed since the last display
2) Percentages -- Shortcuts for displaying percentage progress indicators.
$cry = $crier->percent_cry("Doing something...");
# displays "Doing something... 0%"
$cry->percent($count, $total);
# if it's been over the elapsed time, use ->over to display $count/$total as a percentage
$cry->done;
# does over(" 100%") and closes with "DONE".
$cry->d_fatal;
# if the error level is high enough, skips closing percentage
Crier allows all kinds of progress indicators, but it would be nice to have ones that would automatically deal with percentages and elapsed time.
1) Elapsed time -- Display progress indicator if and only if an amount of time has elapsed.
2) Percentages -- Shortcuts for displaying percentage progress indicators.