ConsoleProgressBar: Tries to be intelligent about start time even if the caller skips the first update.

This commit is contained in:
Jonathan Bernard
2015-06-28 07:35:26 -05:00
parent 4b4998026f
commit 14903c866c
2 changed files with 3 additions and 2 deletions

View File

@ -19,7 +19,8 @@ class ConsoleProgressBar {
private long startTime
void update(int value, String info) {
if (value == 0) startTime = System.currentTimeMillis()
if (value == 0 || startTime == 0)
startTime = System.currentTimeMillis()
def curStep
def curPercent