From 260de525333c4535a571bfd45f45ea7dc56b1ec6 Mon Sep 17 00:00:00 2001 From: Christoph Hagen Date: Sat, 17 Dec 2022 08:26:35 +0100 Subject: [PATCH] Change run time display --- Sources/Generator/run.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Sources/Generator/run.swift b/Sources/Generator/run.swift index f905328..3104578 100644 --- a/Sources/Generator/run.swift +++ b/Sources/Generator/run.swift @@ -119,9 +119,7 @@ private func finish(start: Date, complete: Bool) { print("--- SUMMARY ----------------------------------------") print(" ") let duration = Int(-start.timeIntervalSinceNow.rounded()) - if duration < 60 { - print(" Duration: \(duration) s") - } else if duration < 3600 { + if duration < 3600 { print(String(format: " Duration: %d:%02d", duration / 60, duration % 60)) } else { print(String(format: " Duration: %d:%02d:%02d", duration / 3600, (duration / 60) % 60, duration % 60))