public void OnQuit(StateParam <DeviceState> obj) { threadTimer.Dispose(); threadTimer = null; deleteAllTask(); TaskDic = null; }
// ----------------------- inherite from interface ---------------- public void Dispose() { threadTimer.Dispose(); threadTimer = null; TaskDic.Clear(); TaskDic = null; }
public void OnUnregister(StateParam <GameState> obj) { threadTimer.Dispose(); threadTimer = null; deleteAllTask(); TaskDic = null; }
public TimerMaster() { //DueTime to TimeOut.Infinite to prevent the timer from starting //Period Specify Timeout.Infinite to disable periodic signaling, callback routine run once. threadTimer = new t_Timer(new TimerCallback(ComputeBoundOp), null, Timeout.Infinite, Timeout.Infinite); TaskDic = new Dictionary <int, TimerTask>(); ActionList = new Queue <Action>(); ToBeRemoved = new List <int>(); curUtc = 0; cachedServerTime = 0; }
public HeartBeatClient(WarInfo war, Action disCon) : base(war) { isConnected = false; OnDisconnected = disCon; CurTimeoutCnt = 0; RepeatTimer = new t_Timer(new TimerCallback(Beat), null, Timeout.Infinite, Timeout.Infinite); TimeOut = new t_Timer(new TimerCallback(TTimeOut), null, Timeout.Infinite, Timeout.Infinite); msg = new NetMQMessage(); msg.Append(0); msg.Append(DeviceInfo.GUID); establish(); }