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; }
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; }