ConsoleProgressBar: Tries to be intelligent about start time even if the caller skips the first update.
This commit is contained in:
parent
4b4998026f
commit
14903c866c
@ -2,7 +2,7 @@ apply plugin: "groovy"
|
||||
apply plugin: "maven"
|
||||
|
||||
group = "com.jdbernard"
|
||||
version = "3.6"
|
||||
version = "3.7"
|
||||
|
||||
repositories {
|
||||
mavenCentral() }
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user