public TimedTimerEntry CallPeriodically(int interval, Action action) { TimedTimerEntry timedTimerEntry = new TimedTimerEntry { Interval = interval, Action = action }; timedTimerEntry.Start(); this.RegisterTimerLater(timedTimerEntry); return(timedTimerEntry); }
public virtual void AddTimer(TimedTimerEntry timer) { ExecuteInContext(() => { if (!timer.Enabled) { timer.Start(); } m_timers.Push(timer); }); }
public TimedTimerEntry CallPeriodically(int interval, Action action) { var timer = new TimedTimerEntry { Interval = interval, Action = action }; timer.Start(); RegisterTimer(timer); return(timer); }
public void RegisterTimer(TimedTimerEntry timer) { ExecuteInContext(() => { if (!timer.Enabled) { timer.Start(); } m_timers.Push(timer); }); }
public void Start() { if (Running) { return; } Running = true; TaskPool.Start(); m_updateTimer.Start(); TaskPool.AddTimer(m_updateTimer); }
public TimedTimerEntry CallDelayed(int delay, Action action) { TimedTimerEntry timedTimerEntry = new TimedTimerEntry { Interval = -1, Delay = delay, Action = action }; timedTimerEntry.Start(); this.RegisterTimerLater(timedTimerEntry); return(timedTimerEntry); }
public TimedTimerEntry CallDelayed(int delay, Action action) { var timer = new TimedTimerEntry { Interval = -1, Delay = delay, Action = action }; timer.Start(); RegisterTimer(timer); return(timer); }