예제 #1
0
        // may throw InvalidOperationException, Win32Exception
        public float NextValue()
        {
            CounterSample sample;

            if (changed)
            {
                UpdateInfo();
            }
            GetSample(impl, false, out sample);
            float val;

            if (valid_old)
            {
                val = CounterSampleCalculator.ComputeCounterValue(old_sample, sample);
            }
            else
            {
                val = CounterSampleCalculator.ComputeCounterValue(sample);
            }
            valid_old  = true;
            old_sample = sample;
            return(val);
        }
예제 #2
0
 // Get the next counter sample value.
 public float NextValue()
 {
     return(CounterSampleCalculator
            .ComputeCounterValue(NextSample()));
 }
예제 #3
0
 /// <devdoc>
 ///    Static functions to calculate the performance value off the samples
 /// </devdoc>
 public static float Calculate(CounterSample counterSample, CounterSample nextCounterSample)
 {
     return(CounterSampleCalculator.ComputeCounterValue(counterSample, nextCounterSample));
 }