void heartbeatTick() { Heartbeat heartbeat = (Heartbeat)TimerEvent.Current.State; heartbeat.Execute(Runtime); }
public HeartbeatReplyDispatcher(Heartbeat heartbeat) { _heartbeat = heartbeat; }
public void UnregisterHeartbeat(Heartbeat heartbeat) { lock (_heartbeats) { var timerService = getTimerService(); _heartbeats.Remove(heartbeat); timerService.RemoveEvent(_events[heartbeat]); _events.Remove(heartbeat); } }
public void RegisterHeartbeat(Heartbeat heartbeat) { lock (_heartbeats) { var timerService = getTimerService(); _heartbeats.Add(heartbeat); TimerEvent evt = new TimerEvent(heartbeatTick, heartbeat.Interval, heartbeat); timerService.AddEvent(evt); _events.Add(heartbeat, evt); } }