Ejemplo n.º 1
0
        public static void ExitContext(string context_name)
        {
            if (m_Context[m_Context.Count - 1].Name != context_name)
            {
                Tracer.Error("Profiler.ExitProfiledContext: context_name does not match current context.");
            }
            string[] context = new string[m_Context.Count];
            for (int i = 0; i < m_Context.Count; i++)
            {
                context[i] = m_Context[i].Name;
            }

            m_ThisFrameData.Add(new ProfileData(context, HighPerformanceTimer.SecondsFromTicks(m_Timer.ElapsedTicks - m_Context[m_Context.Count - 1].Tick)));
            m_Context.RemoveAt(m_Context.Count - 1);
        }
Ejemplo n.º 2
0
 public static void EndFrame()
 {
     LastFrameTimeMS = HighPerformanceTimer.SecondsFromTicks(m_Timer.ElapsedTicks - m_BeginFrameTicks) * 1000d;
     TotalTimeMS    += LastFrameTimeMS;
 }
Ejemplo n.º 3
0
 public static void EndFrame()
 {
     LastFrameTimeMS = HighPerformanceTimer.SecondsFromTicks(m_Timer.ElapsedTicks - m_BeginFrameTicks) * 1000d;
     m_TotalTimeData.AddNewHitLength(LastFrameTimeMS);
 }