/// <summary> /// return the time spent in ticks /// </summary> /// <returns></returns> public long AverageTicks() { long?avg = null; for (int i = 0; i < this.mtObjects.Count; i++) { if (!avg.HasValue) { avg = MultiThreadingStatistics.AverageTicks(this.mtObjects[i].statList); } else { avg += MultiThreadingStatistics.AverageTicks(this.mtObjects[i].statList); } } if (!avg.HasValue) { return(0); } return(avg.Value / this.mtObjects.Count); }
/// <summary> /// return the average time spent /// </summary> /// <returns></returns> public int AverageTime() { int?avg = null; for (int i = 0; i < this.mtObjects.Count; i++) { if (!avg.HasValue) { avg = MultiThreadingStatistics.AverageMilliseconds(this.mtObjects[i].statList); } else { avg += MultiThreadingStatistics.AverageMilliseconds(this.mtObjects[i].statList); } } if (!avg.HasValue) { return(0); } return(avg.Value / this.mtObjects.Count); }