Esempio n. 1
0
 public void Pop()
 {
     this.commands.Pop();
     while (this.commands.get_Count() > 0)
     {
         FuncWithEndTime timer = this.commands.Pop();
         if (timer.endTime > DateTime.get_Now())
         {
             this.Push(timer);
             return;
         }
     }
     this.m_defaultFunc.Invoke();
 }
Esempio n. 2
0
 private void execute(FuncWithEndTime timer)
 {
     TimerHeap.DelTimer(this.m_checkPointTimer);
     timer.doFunc.Invoke();
     this.m_checkPointTimer = TimerHeap.AddTimer((uint)(1000.0 * (timer.endTime - DateTime.get_Now()).get_TotalSeconds()), 0, new Action(this.Pop));
 }
Esempio n. 3
0
 public void Push(FuncWithEndTime timer)
 {
     this.commands.Push(timer);
     this.execute(timer);
 }