日期:2014-05-17 浏览次数:20937 次
try
{
using (PerformanceCounter p1 = new PerformanceCounter("Process", "% Processor Time", pname))
{
double sd = (int)p1.NextValue() / Environment.ProcessorCount;
ProcessLoad(sd.ToString());
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}