diff --git a/src/PowerShellEditorServices/Utility/ExecutionTimer.cs b/src/PowerShellEditorServices/Utility/ExecutionTimer.cs index 805f7d05f..e82d5b55c 100644 --- a/src/PowerShellEditorServices/Utility/ExecutionTimer.cs +++ b/src/PowerShellEditorServices/Utility/ExecutionTimer.cs @@ -50,7 +50,7 @@ public static ExecutionTimer Start( [CallerLineNumber] int callerLineNumber = -1) { var timer = new ExecutionTimer(logger, message, callerMemberName, callerFilePath, callerLineNumber); - t_stopwatch.Start(); + Stopwatch.Start(); return timer; } @@ -93,6 +93,6 @@ public void Dispose() callerLineNumber: _callerLineNumber); } - private Stopwatch Stopwatch => t_stopwatch ?? (t_stopwatch = new Stopwatch()); + private static Stopwatch Stopwatch => t_stopwatch ?? (t_stopwatch = new Stopwatch()); } }