Skip to content

Commit a6b2e97

Browse files
committed
code_review: PR #1570
Signed-off-by: leo <[email protected]>
1 parent d09ae6c commit a6b2e97

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/Views/CommandLogTime.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,14 @@ private static string GetDisplayText(ViewModels.CommandLog log)
7272
{
7373
var endTime = log.IsComplete ? log.EndTime : DateTime.Now;
7474
var duration = endTime - log.StartTime;
75-
var durationStr = duration.TotalSeconds >= 1
76-
? $"{duration.TotalSeconds:G3} s"
77-
: $"{duration.TotalMilliseconds:G3} ms";
78-
return $"{log.StartTime:T} ({durationStr})";
75+
76+
if (duration.TotalMinutes >= 1)
77+
return $"{log.StartTime:T} ({duration.TotalMinutes:G3} minutes)";
78+
79+
if (duration.TotalSeconds >= 1)
80+
return $"{log.StartTime:T} ({duration.TotalSeconds:G3} s)";
81+
82+
return $"{log.StartTime:T} ({duration.TotalMilliseconds:G3} ms)";
7983
}
8084

8185
private Timer _refreshTimer = null;

0 commit comments

Comments
 (0)