public void Start() { if (LastAction == null) { LastAction = new TickCounter(); } else { LastAction.SetNow(); } }
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); } }
public void Stop() { LastAction = null; }
public void Reset() { LastAction = new TickCounter(); }
protected PeriodicAction(int freqmsec, bool hastimedout) { mFrequencyMilliSeconds = freqmsec; Autotrigger = hastimedout; LastAction = new TickCounter(); }
public static TickSpan TimeDelta(TickCounter end, TickCounter start) { return(new TickSpan(TimeDeltaMS(end.TickCount, start.TickCount))); }