Codebase list golang-github-vbauerster-mpb / aa921a1
use 0 instead of .0 Vladimir Bauer 8 years ago
1 changed file(s) with 2 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
7575
7676 v := internal.Round(s.average.Value())
7777 if math.IsInf(v, 0) || math.IsNaN(v) {
78 v = .0
78 v = 0
7979 }
8080 remaining := time.Duration((st.Total - st.Current) * int64(v))
8181 hours := int64((remaining / time.Hour) % 60)
141141 return DecoratorFunc(func(st *Statistics, widthAccumulator chan<- int, widthDistributor <-chan int) string {
142142 var str string
143143 timeElapsed := time.Since(startTime)
144
145144 v := internal.Round(float64(timeElapsed) / float64(st.Current))
146145 if math.IsInf(v, 0) || math.IsNaN(v) {
147 v = .0
146 v = 0
148147 }
149148 remaining := time.Duration((st.Total - st.Current) * int64(v))
150149 hours := int64((remaining / time.Hour) % 60)