We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ae8c7c commit b629d2aCopy full SHA for b629d2a
src/Views/CommandLogTime.cs
@@ -68,11 +68,14 @@ private void StopTimer()
68
}
69
70
71
- private string GetDisplayText(ViewModels.CommandLog log)
+ private static string GetDisplayText(ViewModels.CommandLog log)
72
{
73
var endTime = log.IsComplete ? log.EndTime : DateTime.Now;
74
- var duration = (endTime - log.StartTime).ToString(@"hh\:mm\:ss\.fff");
75
- return $"{log.StartTime:T} ({duration})";
+ var duration = endTime - log.StartTime;
+ var durationStr = duration.TotalSeconds >= 1
76
+ ? $"{duration.TotalSeconds:G3} s"
77
+ : $"{duration.TotalMilliseconds:G3} ms";
78
+ return $"{log.StartTime:T} ({durationStr})";
79
80
81
private Timer _refreshTimer = null;
0 commit comments