Ejemplo n.º 1
0
 public void Download(TimePeriodPacket tpp)
 {
     updateDownloaded(tpp);
     _missingTi = TimePeriodManager.Subtracts(_missingTi.ToArray(), tpp);
     updateProbeTime(ProbeTime);
     updateTicksMissing();
 }
Ejemplo n.º 2
0
 static void assertSubtractsAny(TimePeriodPacket[] tis1, TimePeriodPacket ti2, params TimePeriodPacket[] tis)
 {
     TimePeriodPacket[] tiSub = TimePeriodManager.Subtracts(tis1, ti2);
     Assert.AreEqual(tis.Length, tiSub.Length);
     for (int i = 0; i < tis.Length; i++)
     {
         assertEqual(tis[i], tiSub[i]);
     }
 }
Ejemplo n.º 3
0
 private static TimePeriodPacket[] getMissingTIs(TimePeriodPacket[] tisAll, TimePeriodPacket[] tisCompleted)
 {
     if (tisAll == null || tisAll.Length == 0)
     {
         return(new TimePeriodPacket[0]);
     }
     TimePeriodPacket[] subs = TimePeriodManager.Combine(tisAll);
     if (tisCompleted != null && tisCompleted.Length > 0)
     {
         tisCompleted = TimePeriodManager.Combine(tisCompleted);
         for (int i = 0; i < tisCompleted.Length; i++)
         {
             subs = TimePeriodManager.Subtracts(subs, tisCompleted[i]);
         }
     }
     return(subs);
 }