// 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); }
// Get the next counter sample value. public float NextValue() { return(CounterSampleCalculator .ComputeCounterValue(NextSample())); }
/// <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)); }