mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-14 20:24:57 +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()
|
public void StartTimer()
|
||||||
{
|
{
|
||||||
CleanUpTimer();
|
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()
|
public void StopTimer()
|
||||||
{
|
{
|
||||||
|
Debug.Console(0, this, "Stopping Timer");
|
||||||
_timer.Stop();
|
_timer.Stop();
|
||||||
|
|
||||||
ExecuteAction(GetActionFromConfig(eRetriggerableTimerEvents.Stopped));
|
ExecuteAction(GetActionFromConfig(eRetriggerableTimerEvents.Stopped));
|
||||||
|
|||||||
Reference in New Issue
Block a user