Example #1
0
 public void Start()
 {
     if (LastAction == null)
     {
         LastAction = new TickCounter();
     }
     else
     {
         LastAction.SetNow();
     }
 }
Example #2
0
        private void UpdateAggregatedBitrate()
        {
            var windowbitrate = AggregationWindowBitrate();

            AggregatedBitrate = (AggregatedBitrate * EMAAlpha) + windowbitrate * EMAAlphaRes;

            AggregationWindowDataBytes /= 2;
            AggregationWindowStart      = TickCounter.Now - AggregationWindowMilliseconds / 2;

            if (EMAAlpha < EMAAlphaMax)
            {
                UpdateAlpha(EMAAlpha + 0.05f);
            }
        }
Example #3
0
 public void Stop()
 {
     LastAction = null;
 }
Example #4
0
 public void Reset()
 {
     LastAction = new TickCounter();
 }
Example #5
0
 protected PeriodicAction(int freqmsec, bool hastimedout)
 {
     mFrequencyMilliSeconds = freqmsec;
     Autotrigger            = hastimedout;
     LastAction             = new TickCounter();
 }
Example #6
0
 public static TickSpan TimeDelta(TickCounter end, TickCounter start)
 {
     return(new TickSpan(TimeDeltaMS(end.TickCount, start.TickCount)));
 }