From 6488901df0f6fc83bdb5485adc746dde4dbdfc41 Mon Sep 17 00:00:00 2001 From: Christoffer Lundell Date: Thu, 21 Mar 2024 17:06:53 +0100 Subject: [PATCH] fix fmtDuration --- formatting.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/formatting.go b/formatting.go index e551d1f..65713d7 100644 --- a/formatting.go +++ b/formatting.go @@ -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 {