Codebase list golang-github-vbauerster-mpb / 235f0a4
AverageETA AverageSpeed Vladimir Bauer 8 years ago
2 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
126126 }
127127 }
128128
129 // TotalAverageETA decorator.
129 // AverageETA decorator.
130130 //
131131 // `style` one of [ET_STYLE_GO|ET_STYLE_HHMMSS|ET_STYLE_HHMM|ET_STYLE_MMSS]
132132 //
133133 // `wcc` optional WC config
134 func TotalAverageETA(style int, wcc ...WC) Decorator {
134 func AverageETA(style int, wcc ...WC) Decorator {
135135 var wc WC
136136 for _, widthConf := range wcc {
137137 wc = widthConf
229229 }
230230 }
231231
232 // TotalAverageSpeed decorator with dynamic unit measure adjustement.
232 // AverageSpeed decorator with dynamic unit measure adjustement.
233233 //
234234 // `unit` one of [0|UnitKiB|UnitKB] zero for no unit
235235 //
236236 // `unitFormat` printf compatible verb for value, like "%f" or "%d"
237237 //
238238 // `wcc` optional WC config
239 func TotalAverageSpeed(unit int, unitFormat string, wcc ...WC) Decorator {
239 func AverageSpeed(unit int, unitFormat string, wcc ...WC) Decorator {
240240 var wc WC
241241 for _, widthConf := range wcc {
242242 wc = widthConf