Skip to content

Commit

Permalink
Correctly include total time taken if the task takes 24 hours or more.
Browse files Browse the repository at this point in the history
Old system would incorrectly truncate the time taken.
  • Loading branch information
num0005 committed Oct 19, 2024
1 parent fd52df6 commit 09b34f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Launcher/CancelableProgressBarWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected void updateNoInvoke()
} else if (Complete)
{
stopwatch.Stop();
string timeElapsed = String.Format("({0:00}:{1:00}:{2:00})", stopwatch.Elapsed.Hours, stopwatch.Elapsed.Minutes, stopwatch.Elapsed.Seconds);
string timeElapsed = String.Format("({0:00}:{1:00}:{2:00})", Math.Floor(stopwatch.Elapsed.TotalHours), stopwatch.Elapsed.Minutes, stopwatch.Elapsed.Seconds);
if (IsCancelled)
Status = cancelReason is null ? "Canceled! " + timeElapsed : $"Canceled ({cancelReason})! " + timeElapsed;
else
Expand Down

0 comments on commit 09b34f6

Please sign in to comment.