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); }
public void Stop(StatisticTiming timing) { this.Timings[(int)timing].Stopped = this.Stopwatch.ElapsedMilliseconds; }
public CapturedTiming Start(StatisticTiming timing) { return this.Timings[(int)timing] = new CapturedTiming() { Timing = timing, Started = this.Stopwatch.ElapsedMilliseconds }; }