private List <TrapperItem> GetTimeMonitors()
        {
            List <TrapperItem> result = new List <TrapperItem>();

            List <string> names = TimeMonitorRepository.GetTimeMonitorNames();

            foreach (string name in names)
            {
                TimeMonitor tm = TimeMonitorRepository.GetTimeMonitor(name);

                double totalCall1 = tm.GetTotalCall1();

                double totalTime1 = tm.GetTotalTime1();

                result.Add(new TimeMonitorTrapperItem(name + "_call1", FormatDouble(totalCall1)));

                result.Add(new TimeMonitorTrapperItem(name + "_time1", FormatDouble(totalTime1)));

                result.Add(new TimeMonitorTrapperItem(name + "_timeCall1", FormatDouble(0D == totalCall1 ? 0D : totalTime1 / totalCall1)));
            }

            return(result);
        }
 public void AddError(Counters counterName)
 {
     TimeMonitorRepository.SaveTime(counterName.ToString(), 0L);
 }
 public void AddTime(Counters counterName, IStopwatch watch)
 {
     TimeMonitorRepository.SaveTime(counterName.ToString(), watch.ElapsedNanoseconds);
 }