Codebase list golang-github-vbauerster-mpb / f8d1b54
perfer time.Duration.Truncate, address issue #128 Vladimir Bauer 3 years ago
1 changed file(s) with 4 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
198198 }
199199 default:
200200 return func(remaining time.Duration) string {
201 // strip off nanoseconds
202 return ((remaining / time.Second) * time.Second).String()
203 }
204 }
205 }
201 return remaining.Truncate(time.Second).String()
202 }
203 }
204 }