/// <summary> /// Registers a repeated-timer, which will be fired /// periodically for every specified interval. /// </summary> /// <param name="first">The first event will be sent after this interval.</param> /// <param name="interval">Successive events will be fired with this interval.</param> /// <returns> /// The cookie, which shall be then used to unregister the timer. /// </returns> /// <param name="handler"></param> public ClockHandler registerRepeated(ClockHandler handler, TimeLength first, TimeLength interval) { Debug.Assert(interval.totalMinutes != 0 && first.totalMinutes != 0); RepeatedTimer rt = new RepeatedTimer(this, handler, first, interval); return(new ClockHandler(rt.onClock)); }
public override void Load(SessionIdleCheckerComponent self) { RepeatedTimer repeatedTimer = TimerComponent.Instance.GetRepeatedTimer(self.RepeatedTimer); if (repeatedTimer != null) { repeatedTimer.Callback = self.Check; } }