public void Stop(string name) { TimeVar t = m_timeVarMap[name]; if (t == null) { return; } t.stop(); }
public void RemoveTimer(string name) { TimeVar t = m_timeVarMap[name]; if (t != null) { m_timeVarMap.Remove(name); } m_listTimerName.Remove(name); }
public void AppendTimeVar(TimeVar tv) { lock (m_mutex) { if (!ContainsTimer(tv.Name)) { AddTimer(tv.Name); } TimeVar t = m_timeVarMap[tv.Name]; t.Merge(tv); } }
public void Report() { Console.WriteLine("\nTime Report:"); foreach (string timername in m_listTimerName) { TimeVar t = m_timeVarMap[timername]; if ((t != null) && t.isUse()) { t.report(); } } }
public void Merge(TimeVar tm) { m_elapsed.m_time += tm.m_elapsed.m_time; m_count += tm.m_count; }
public void AddTimer(string name) { m_timeVarMap[name] = new TimeVar(name); m_listTimerName.Add(name); }