diff --git a/build.gradle b/build.gradle index b146926..9eb3517 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ apply plugin: "groovy" apply plugin: "maven" group = "com.jdbernard" -version = "3.6" +version = "3.7" repositories { mavenCentral() } diff --git a/src/main/groovy/com/jdbernard/util/ConsoleProgressBar.groovy b/src/main/groovy/com/jdbernard/util/ConsoleProgressBar.groovy index 94876e9..ddf6301 100644 --- a/src/main/groovy/com/jdbernard/util/ConsoleProgressBar.groovy +++ b/src/main/groovy/com/jdbernard/util/ConsoleProgressBar.groovy @@ -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