Skip to content

Commit

Permalink
Merge pull request #44 from HoppenR/timefmt-fix
Browse files Browse the repository at this point in the history
fix fmtDuration
  • Loading branch information
jbpratt authored Mar 21, 2024
2 parents ad44b03 + 6488901 commit b9b6f71
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions formatting.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ import (
)

func fmtDuration(d time.Duration) string {
d = d.Round(time.Second)
minutes := d / time.Minute
d -= minutes * time.Minute
seconds := d / time.Second
return fmt.Sprintf("%02d:%02d", minutes, seconds)
return d.String()
}

func durationBar(width int, fraction time.Duration, total time.Duration) string {
Expand Down

0 comments on commit b9b6f71

Please sign in to comment.