Codebase list golang-github-vbauerster-mpb / e7c8381
last speed value on complete Vladimir Bauer 7 years ago
1 changed file(s) with 4 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
226226 }
227227 wc.BuildFormat()
228228 startTime := time.Now()
229 var str string
229230 return DecoratorFunc(func(st *Statistics, widthAccumulator chan<- int, widthDistributor <-chan int) string {
230 var str string
231 if st.Completed {
232 return wc.FormatMsg(str, widthAccumulator, widthDistributor)
233 }
231234 timeElapsed := time.Since(startTime)
232235 speed := float64(st.Current) / timeElapsed.Seconds()
233236