diff --git a/ICD.Common.Utils.Tests/Timers/SafeTimerTest.cs b/ICD.Common.Utils.Tests/Timers/SafeTimerTest.cs index 9984ce9..603e969 100644 --- a/ICD.Common.Utils.Tests/Timers/SafeTimerTest.cs +++ b/ICD.Common.Utils.Tests/Timers/SafeTimerTest.cs @@ -49,12 +49,14 @@ namespace ICD.Common.Utils.Tests.Timers [Test] public void TriggerTest() { - bool called = false; - SafeTimer timer = SafeTimer.Stopped(() => called = true); + int called = 0; + SafeTimer timer = SafeTimer.Stopped(() => called++); timer.Trigger(); - Assert.IsTrue(called); + ThreadingUtils.Sleep(50); + + Assert.AreEqual(1, called); timer.Dispose(); } diff --git a/ICD.Common.Utils/Timers/SafeTimer.cs b/ICD.Common.Utils/Timers/SafeTimer.cs index 1ed80bd..9e4df8b 100644 --- a/ICD.Common.Utils/Timers/SafeTimer.cs +++ b/ICD.Common.Utils/Timers/SafeTimer.cs @@ -112,7 +112,6 @@ namespace ICD.Common.Utils.Timers m_Timer.Reset(); #else m_Timer.Change(0, m_RepeatPeriod); - m_Callback(); #endif }