From 04f7e528035309e0467e7bbac08997818f602eaa Mon Sep 17 00:00:00 2001 From: albertony <12441419+albertony@users.noreply.github.com> Date: Mon, 6 Feb 2023 12:52:22 +0100 Subject: [PATCH] accounting: show human readable elapsed time when longer than a day - fixes #6748 --- fs/accounting/stats.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/accounting/stats.go b/fs/accounting/stats.go index 51d910767..6522d1779 100644 --- a/fs/accounting/stats.go +++ b/fs/accounting/stats.go @@ -453,7 +453,7 @@ func (s *StatsInfo) String() string { _, _ = fmt.Fprintf(buf, "Transferred: %10d / %d, %s\n", s.transfers, ts.totalTransfers, percent(s.transfers, ts.totalTransfers)) } - _, _ = fmt.Fprintf(buf, "Elapsed time: %10ss\n", strings.TrimRight(elapsedTime.Truncate(time.Minute).String(), "0s")+fmt.Sprintf("%.1f", elapsedTimeSecondsOnly.Seconds())) + _, _ = fmt.Fprintf(buf, "Elapsed time: %10ss\n", strings.TrimRight(fs.Duration(elapsedTime.Truncate(time.Minute)).ReadableString(), "0s")+fmt.Sprintf("%.1f", elapsedTimeSecondsOnly.Seconds())) } // checking and transferring have their own locking so unlock