I am using the following code to get the CPU usage
PerformanceCoun ter myCounter;
myCounter = new PerformanceCoun ter();
myCounter.Categ oryName = "Processor" ;
myCounter.Count erName = "% Processor Time";
myCounter.Insta nceName = "_Total";
for(int i=0; i < 20; i++)
myCounter.NextV alue();
I ran this progam i am seeing values 0 or 100%, but when i see the task
manager the CPU usage is 6 to 22 %.
Am i missing something
--
Sirisha
PerformanceCoun ter myCounter;
myCounter = new PerformanceCoun ter();
myCounter.Categ oryName = "Processor" ;
myCounter.Count erName = "% Processor Time";
myCounter.Insta nceName = "_Total";
for(int i=0; i < 20; i++)
myCounter.NextV alue();
I ran this progam i am seeing values 0 or 100%, but when i see the task
manager the CPU usage is 6 to 22 %.
Am i missing something
--
Sirisha
Comment