예제 #1
0
        public void Stop(string name)
        {
            TimeVar t = m_timeVarMap[name];

            if (t == null)
            {
                return;
            }
            t.stop();
        }
예제 #2
0
        public void RemoveTimer(string name)
        {
            TimeVar t = m_timeVarMap[name];

            if (t != null)
            {
                m_timeVarMap.Remove(name);
            }
            m_listTimerName.Remove(name);
        }
예제 #3
0
 public void AppendTimeVar(TimeVar tv)
 {
     lock (m_mutex) {
         if (!ContainsTimer(tv.Name))
         {
             AddTimer(tv.Name);
         }
         TimeVar t = m_timeVarMap[tv.Name];
         t.Merge(tv);
     }
 }
예제 #4
0
 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();
         }
     }
 }
예제 #5
0
 public void Merge(TimeVar tm)
 {
     m_elapsed.m_time += tm.m_elapsed.m_time;
     m_count          += tm.m_count;
 }
예제 #6
0
 public void AddTimer(string name)
 {
     m_timeVarMap[name] = new TimeVar(name);
     m_listTimerName.Add(name);
 }