public float NextValue() { CounterSample nextCounterSample = this.NextSample(); float num = 0f; num = CounterSample.Calculate(this.oldSample, nextCounterSample); this.oldSample = nextCounterSample; return(num); }
/// <summary> /// Obtains a counter sample and returns the calculated value for it. /// NOTE: For counters whose calculated value depend upon 2 counter reads, /// the very first read will return 0.0. /// </summary> public float NextValue() { //No need to initialize or Demand, since NextSample already does. CounterSample newSample = NextSample(); float retVal = 0.0f; retVal = CounterSample.Calculate(_oldSample, newSample); _oldSample = newSample; return(retVal); }