コード例 #1
0
 public ThreadTimer(long nextexpiredTime, long lastHandleTime, HeartbeatCallback pHeartbeatCallback, long interval, long sequence, bool ifPersist)
 {
     this.nextexpiredTime    = nextexpiredTime;
     this.lastHandleTime     = lastHandleTime;
     this.pHeartbeatCallback = pHeartbeatCallback;
     this.interval           = interval;
     this.sequence           = sequence;
     this.ifPersist          = ifPersist;
 }
コード例 #2
0
        public long AddTimer(HeartbeatCallback pHeartbeatCallback, long interval, bool ifPersist)
        {
            long        nowTime      = this.internalTime;
            long        seqID        = this.timerSequence;
            long        nextTime     = nowTime + interval;
            ThreadTimer lThreadTimer = new ThreadTimer(nextTime, nowTime, pHeartbeatCallback, interval, seqID, ifPersist);

            this._toAddTimer.Add(lThreadTimer);
            return(seqID);
        }
コード例 #3
0
ファイル: ConnectionI.cs プロジェクト: zhangwei5095/ice
 public void setHeartbeatCallback(HeartbeatCallback callback)
 {
     lock(this)
     {
         _heartbeatCallback = callback;
     }
 }
コード例 #4
0
 public void RegisterCallback(HeartbeatCallback callback)
 {
     _heartbeatCallback = callback;
 }
コード例 #5
0
 public void RegisterCallback(HeartbeatCallback callback)
 {
     _scriptManager.RegisterCallback(callback);
 }
コード例 #6
0
 public long AddTimer(HeartbeatCallback pHeartbeatCallback, long interval, bool ifPersist) =>
 this.battleTimer.AddTimer(pHeartbeatCallback, interval, ifPersist);