Calculate() public static method

public static Calculate ( System counterSample ) : float
counterSample System
return float
Exemplo n.º 1
0
        public float NextValue()
        {
            CounterSample nextCounterSample = this.NextSample();
            float         num = 0f;

            num            = CounterSample.Calculate(this.oldSample, nextCounterSample);
            this.oldSample = nextCounterSample;
            return(num);
        }
Exemplo n.º 2
0
        /// <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);
        }