mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-13 12:37:07 +00:00
Fixes timer from executing immediately on construction. Adds some helpful debug statements
This commit is contained in:
parent
ef7eae50e4
commit
2fc1f45161
1 changed files with 3 additions and 1 deletions
|
|
@ -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));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue