Esempio n. 1
0
        public static TimerProfile GetProfile( this Timer timer )
        {
            if ( !Environment.Profiling )
                return null;

            string name = timer.ToString();

            TimerProfile prof = (TimerProfile) m_Profiles[name];

            if ( prof == null )
                m_Profiles[name] = prof = new TimerProfile();

            return prof;
        }
Esempio n. 2
0
		public TimerProfile GetProfile()
		{
			if ( !Core.Profiling )
				return null;

			string name = ToString();

			if ( name == null )
				name = "null";

			TimerProfile prof = (TimerProfile)m_Profiles[name];

			if ( prof == null )
				m_Profiles[name] = prof = new TimerProfile();

			return prof;
		}