Example #1
0
        public static void Slice()
        {
            lock (m_Queue)
            {
                m_QueueCountAtSlice = m_Queue.Count;

                int index = 0;

                while (index < m_BreakCount && m_Queue.Count != 0)
                {
                    Timer        t    = m_Queue.Dequeue();
                    TimerProfile prof = t.GetProfile();

                    if (prof != null)
                    {
                        prof.Start();
                    }

                    t.OnTick();
                    t.m_Queued = false;
                    ++index;

                    if (prof != null)
                    {
                        prof.Finish();
                    }
                }
            }
        }
Example #2
0
        public static void Slice()
        {
            if (Core.DetailedProfiling)
            {
                ++Server.Custom.DetailedProfiler.num_frames;
            }

            lock ( m_Queue )
            {
                m_QueueCountAtSlice = m_Queue.Count;

                int index = 0;

                while (index < m_BreakCount && m_Queue.Count != 0)
                {
                    Timer        t    = m_Queue.Dequeue();
                    TimerProfile prof = t.GetProfile();

                    if (prof != null)
                    {
                        prof.Start();
                    }

                    t.OnTick();
                    t.m_Queued = false;
                    ++index;

                    if (prof != null)
                    {
                        prof.Finish();
                    }
                }
            }
        }