示例#1
0
        // Token: 0x06003D1F RID: 15647 RVA: 0x000E3504 File Offset: 0x000E1704
        private void FireNextTimers()
        {
            TimerQueueTimer timerQueueTimer = null;

            lock (this)
            {
                try
                {
                }
                finally
                {
                    this.m_isAppDomainTimerScheduled = false;
                    bool            flag2            = false;
                    uint            num              = uint.MaxValue;
                    int             tickCount        = TimerQueue.TickCount;
                    TimerQueueTimer timerQueueTimer2 = this.m_timers;
                    while (timerQueueTimer2 != null)
                    {
                        uint num2 = (uint)(tickCount - timerQueueTimer2.m_startTicks);
                        if (num2 >= timerQueueTimer2.m_dueTime)
                        {
                            TimerQueueTimer next = timerQueueTimer2.m_next;
                            if (timerQueueTimer2.m_period != 4294967295U)
                            {
                                timerQueueTimer2.m_startTicks = tickCount;
                                timerQueueTimer2.m_dueTime    = timerQueueTimer2.m_period;
                                if (timerQueueTimer2.m_dueTime < num)
                                {
                                    flag2 = true;
                                    num   = timerQueueTimer2.m_dueTime;
                                }
                            }
                            else
                            {
                                this.DeleteTimer(timerQueueTimer2);
                            }
                            if (timerQueueTimer == null)
                            {
                                timerQueueTimer = timerQueueTimer2;
                            }
                            else
                            {
                                TimerQueue.QueueTimerCompletion(timerQueueTimer2);
                            }
                            timerQueueTimer2 = next;
                        }
                        else
                        {
                            uint num3 = timerQueueTimer2.m_dueTime - num2;
                            if (num3 < num)
                            {
                                flag2 = true;
                                num   = num3;
                            }
                            timerQueueTimer2 = timerQueueTimer2.m_next;
                        }
                    }
                    if (flag2)
                    {
                        this.EnsureAppDomainTimerFiresBy(num);
                    }
                }
            }
            if (timerQueueTimer != null)
            {
                timerQueueTimer.Fire();
            }
        }
示例#2
0
        private void FireNextTimers()
        {
            TimerQueueTimer timerQueueTimer = (TimerQueueTimer)null;

            lock (this)
            {
                try
                {
                }
                finally
                {
                    this.m_isAppDomainTimerScheduled = false;
                    bool            local_3 = false;
                    uint            local_4 = uint.MaxValue;
                    int             local_5 = TimerQueue.TickCount;
                    TimerQueueTimer local_6 = this.m_timers;
                    while (local_6 != null)
                    {
                        uint local_7 = (uint)(local_5 - local_6.m_startTicks);
                        if (local_7 >= local_6.m_dueTime)
                        {
                            TimerQueueTimer temp_33 = local_6.m_next;
                            if ((int)local_6.m_period != -1)
                            {
                                local_6.m_startTicks = local_5;
                                TimerQueueTimer temp_44 = local_6;
                                int             temp_45 = (int)temp_44.m_period;
                                temp_44.m_dueTime = (uint)temp_45;
                                if (local_6.m_dueTime < local_4)
                                {
                                    local_3 = true;
                                    local_4 = local_6.m_dueTime;
                                }
                            }
                            else
                            {
                                this.DeleteTimer(local_6);
                            }
                            if (timerQueueTimer == null)
                            {
                                timerQueueTimer = local_6;
                            }
                            else
                            {
                                TimerQueue.QueueTimerCompletion(local_6);
                            }
                            local_6 = temp_33;
                        }
                        else
                        {
                            uint local_8 = local_6.m_dueTime - local_7;
                            if (local_8 < local_4)
                            {
                                local_3 = true;
                                local_4 = local_8;
                            }
                            local_6 = local_6.m_next;
                        }
                    }
                    if (local_3)
                    {
                        this.EnsureAppDomainTimerFiresBy(local_4);
                    }
                }
            }
            if (timerQueueTimer == null)
            {
                return;
            }
            timerQueueTimer.Fire();
        }