Skip to content

Commit 8f85cd7

Browse files
committed
fixes Windows progress indicator
1 parent 9d3af8d commit 8f85cd7

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

core/Progress.fs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,10 @@ module internal WindowsProgress =
5050
let title = System.Console.Title
5151

5252
let fmtTs (ts:System.TimeSpan) =
53-
let format_string = function
54-
| _ when ts.TotalHours >= 1.0 -> "h'h'\ mm'm'\ ss's'"
55-
| _ when ts.TotalMinutes >= 1.0 -> "mm'm'\ ss's'"
56-
| _ -> "'ss's'"
57-
in
58-
format_string ts |> ts.ToString
53+
(if ts.TotalHours >= 1.0 then "h'h'\ mm'm'\ ss's'"
54+
else if ts.TotalMinutes >= 1.0 then "mm'm'\ ss's'"
55+
else "'0m 'ss's'")
56+
|> ts.ToString
5957

6058
// try to change a title to ensure we will not fail later
6159
System.Console.Title <- title

0 commit comments

Comments
 (0)