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"
|
apply plugin: "maven"
|
||||||
|
|
||||||
group = "com.jdbernard"
|
group = "com.jdbernard"
|
||||||
version = "3.6"
|
version = "3.7"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral() }
|
mavenCentral() }
|
||||||
|
@ -19,7 +19,8 @@ class ConsoleProgressBar {
|
|||||||
private long startTime
|
private long startTime
|
||||||
|
|
||||||
void update(int value, String info) {
|
void update(int value, String info) {
|
||||||
if (value == 0) startTime = System.currentTimeMillis()
|
if (value == 0 || startTime == 0)
|
||||||
|
startTime = System.currentTimeMillis()
|
||||||
|
|
||||||
def curStep
|
def curStep
|
||||||
def curPercent
|
def curPercent
|
||||||
|
Loading…
Reference in New Issue
Block a user