Esempio n. 1
0
 /// <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);
     }
 }
Esempio n. 2
0
 /// <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);
     }
 }