public static TimerProfile Acquire(string name) { if (BaseProfile.Profiling == false) { return null; } TimerProfile prof; if (mProfiles.TryGetValue(name, out prof) == false) { mProfiles.Add(name, prof = new TimerProfile(name)); } return prof; }
public void Stop() { if (!mRunning) { return; } mRunning = false; TimerThread.RemoveTimer(this); TimerProfile prof = GetProfile(); if (prof != null) { prof.Stopped++; } }
public static TimerProfile Acquire(string name) { if (BaseProfile.Profiling == false) { return(null); } TimerProfile prof; if (mProfiles.TryGetValue(name, out prof) == false) { mProfiles.Add(name, prof = new TimerProfile(name)); } return(prof); }
public void Start() { if (mRunning) { return; } mRunning = true; TimerThread.AddTimer(this); TimerProfile prof = GetProfile(); if (prof != null) { prof.Started++; } }