示例#1
0
 private void CheckT3Timeout()
 {
     try
     {
         List <long> list = new List <long>();
         foreach (long num in this.mTimerMsg.Keys)
         {
             list.Add(num);
         }
         for (int i = 0; i < list.Count; i++)
         {
             SECS1Timer.CheckTimerPara para = this.mTimerMsg[list[i]];
             double num2 = (DateTime.Now - para.StartTime).TotalMilliseconds / 1000.0;
             if (num2 > (double)this.mT3Interval)
             {
                 this.logger.Debug(string.Format("SECS1Timer::CheckT3Timeout: {0}, {1}", num2, para.SystemBytes));
                 this.logger.Info(string.Format("T3 Timeout: {0}, {1}", num2, para.SystemBytes));
                 this.mTimerMsg.Remove(list[i]);
                 TimerPara para2 = new TimerPara
                 {
                     Type = eTimeout.T3,
                     Msg  = para.msg
                 };
                 this.mTimeoutQueue.Enqueue(para2);
             }
         }
     }
     catch (Exception exception)
     {
         this.logger.Error("CheckT3Timeout: ", exception);
     }
 }
示例#2
0
 private void StartTimer(eTimeout e)
 {
     try
     {
         lock (this.syncTimeout)
         {
             SECS1Timer.CheckTimerPara para = new SECS1Timer.CheckTimerPara
             {
                 SystemBytes = (long)e,
                 msg         = null,
                 StartTime   = DateTime.Now
             };
             this.mOtherTimers.Add(e, para);
         }
         if (e != eTimeout.T1)
         {
             this.logger.Debug(string.Format("Start {0} Timer", e));
         }
     }
     catch (Exception exception)
     {
         this.logger.Error("HSMSTimer::StartTimer ", exception);
     }
 }