sp;// constants used to select the performance counter.
private const string CategoryName = "Processor";
private const string CounterName = "% Processor Time";
private const string InstanceName = "_Total";
}
这是在我
计算机上的计算结果:
Entering measurement loop.
CPU load = 0 %.
CPU load = 1.941746 %.
CPU load = 4.854369 %.
CPU load = 10 %.
CPU load = 0 %.
CPU load = 2.999997 %.
CPU load = 0.9900987 %.
CPU load = 0 %.