/// <summary> /// Adds the specified new data. /// </summary> /// <param name="newData">The new data.</param> public void Add(BatStats newData) { if (newData != null && newData.count > 0) { if (newData.maxDuration > maxDuration) { maxDuration = newData.maxDuration; } if (newData.minDuration < minDuration) { minDuration = newData.minDuration; } count += newData.count; segments += newData.segments; passes += newData.passes; totalDuration += newData.totalDuration; meanDuration = new TimeSpan(totalDuration.Ticks / count); } }
/// <summary> /// Adds the specified new data. /// </summary> /// <param name="newData">The new data.</param> public void Add(BatStats newData) { if (newData != null && newData.count > 0) { if (newData.maxDuration > maxDuration) maxDuration = newData.maxDuration; if (newData.minDuration < minDuration) minDuration = newData.minDuration; count += newData.count; segments += newData.segments; passes += newData.passes; totalDuration += newData.totalDuration; meanDuration = new TimeSpan(totalDuration.Ticks / count); } }