UnityEditor.SimpleProfiler.End C# (CSharp) Method

End() private method

private End ( ) : void
return void
        public static void End()
        {
            string key = m_Names.Pop();
            float num = Time.realtimeSinceStartup - m_StartTime.Pop();
            if (m_Timers.ContainsKey(key))
            {
                Dictionary<string, float> dictionary;
                string str2;
                (dictionary = m_Timers)[str2 = key] = dictionary[str2] + num;
            }
            else
            {
                m_Timers[key] = num;
            }
            if (m_Calls.ContainsKey(key))
            {
                Dictionary<string, int> dictionary2;
                string str3;
                (dictionary2 = m_Calls)[str3 = key] = dictionary2[str3] + 1;
            }
            else
            {
                m_Calls[key] = 1;
            }
        }

Usage Example

        private int GetMatchKey(BoneMatch parentMatch, Transform t, BoneMappingItem goalItem)
        {
            SimpleProfiler.Begin("GetMatchKey");
            int key = goalItem.bone;

            key += t.GetInstanceID() * 1000;
            if (parentMatch != null)
            {
                key += parentMatch.bone.GetInstanceID() * 1000000;
                if (parentMatch.parent != null)
                {
                    key += parentMatch.parent.bone.GetInstanceID() * 1000000000;
                }
            }
            SimpleProfiler.End();
            return(key);
        }
All Usage Examples Of UnityEditor.SimpleProfiler::End