Default output to stdout.
This commit is contained in:
parent
57e9419565
commit
a5dae03897
@ -2,7 +2,7 @@ apply plugin: "groovy"
|
|||||||
apply plugin: "maven"
|
apply plugin: "maven"
|
||||||
|
|
||||||
group = "com.jdbernard"
|
group = "com.jdbernard"
|
||||||
version = "1.2.1"
|
version = "1.2.2"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Package
|
# Package
|
||||||
|
|
||||||
version = "1.2.1"
|
version = "1.2.2"
|
||||||
author = "Jonathan Bernard"
|
author = "Jonathan Bernard"
|
||||||
description = "Utility for writing dynamic progress bars to the console."
|
description = "Utility for writing dynamic progress bars to the console."
|
||||||
license = "BSD"
|
license = "BSD"
|
||||||
@ -9,4 +9,3 @@ srcDir = "src/main/nim"
|
|||||||
# Dependencies
|
# Dependencies
|
||||||
|
|
||||||
requires "nim >= 0.13.0"
|
requires "nim >= 0.13.0"
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ proc getMax*(pd: Progress): BiggestInt =
|
|||||||
proc setMax*(pd: Progress, maxValue: BiggestInt) =
|
proc setMax*(pd: Progress, maxValue: BiggestInt) =
|
||||||
pd.maxValue = max(maxValue, 1)
|
pd.maxValue = max(maxValue, 1)
|
||||||
|
|
||||||
proc newProgress*(sout: File, maxValue: BiggestInt): Progress =
|
proc newProgress*(maxValue: BiggestInt, sout: File = stdout): Progress =
|
||||||
return Progress(sout: sout,
|
return Progress(sout: sout,
|
||||||
startTime: cpuTime(),
|
startTime: cpuTime(),
|
||||||
lastStep: 0,
|
lastStep: 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user