mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-29 04:15:00 +00:00
Fixes timer from executing immediately on construction. Adds some helpful debug statements
This commit is contained in:
@@ -60,12 +60,14 @@ namespace PepperDash.Essentials.Core.Timers
|
||||
public void StartTimer()
|
||||
{
|
||||
CleanUpTimer();
|
||||
Debug.Console(0, this, "Starting Timer");
|
||||
|
||||
_timer = new CTimer(TimerElapsedCallback, GetActionFromConfig(eRetriggerableTimerEvents.Elapsed), 0, _timerIntervalMs);
|
||||
_timer = new CTimer(TimerElapsedCallback, GetActionFromConfig(eRetriggerableTimerEvents.Elapsed), _timerIntervalMs, _timerIntervalMs);
|
||||
}
|
||||
|
||||
public void StopTimer()
|
||||
{
|
||||
Debug.Console(0, this, "Stopping Timer");
|
||||
_timer.Stop();
|
||||
|
||||
ExecuteAction(GetActionFromConfig(eRetriggerableTimerEvents.Stopped));
|
||||
|
||||
Reference in New Issue
Block a user