Пример #1
0
        private void ReportTiming(string format, StatisticTiming timing, params object[] other)
        {
            var capture = this.Timings[(int)timing];

            var data = new object[1 + other.Length];
            data[0] = (capture == null) ? 0 : (capture.Stopped - capture.Started) / (float)1000; ;
            other.CopyTo(data, 1);

            Console.WriteLine(format, data);
        }
Пример #2
0
 public void Stop(StatisticTiming timing)
 {
     this.Timings[(int)timing].Stopped = this.Stopwatch.ElapsedMilliseconds;
 }
Пример #3
0
 public CapturedTiming Start(StatisticTiming timing)
 {
     return this.Timings[(int)timing] = new CapturedTiming() { Timing = timing, Started = this.Stopwatch.ElapsedMilliseconds };
 }