From 566884167f5250e2db3655dccd1252def3b6e0b2 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Mon, 8 Oct 2018 16:33:52 -0400 Subject: [PATCH] fix: Potential fix for weird profiling offset --- ICD.Common.Utils/Timers/IcdStopwatch.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ICD.Common.Utils/Timers/IcdStopwatch.cs b/ICD.Common.Utils/Timers/IcdStopwatch.cs index 006e666..0e0d84e 100644 --- a/ICD.Common.Utils/Timers/IcdStopwatch.cs +++ b/ICD.Common.Utils/Timers/IcdStopwatch.cs @@ -308,11 +308,13 @@ namespace ICD.Common.Utils.Timers if (elapsed >= RED_MILLISECONDS) color = eConsoleColor.Red; - if (s_ProfileIndentCount > 0) - IcdConsole.Print(StringUtils.Repeat(" ", s_ProfileIndentCount - 1)); + string padding = null; - IcdConsole.Print(color, "{0:n}ms", elapsed); - IcdConsole.PrintLine(" to execute {0}", name); + if (s_ProfileIndentCount > 0) + padding = StringUtils.Repeat(" ", s_ProfileIndentCount - 1); + + IcdConsole.Print(color, "{0}{1:n}ms ", padding, elapsed); + IcdConsole.PrintLine("to execute {0}", name); } #endregion