Click here to Skip to main content
15,879,490 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can i check my pc cpu usage for previous time
Posted
Comments
Member 10331093 11-Oct-13 16:57pm    
any one help me very needfull

1 solution

You can't.

You'll need to take a reading whenever you know you'll need it in the future and store it in a variable.

I once did the following and worked like a charm:
Took readings of CPU usage into an array every so many seconds. Maybe just 2 variables may work for you.
Then, as well, every so many seconds I "pulled down" my readings so the newest reading would take the first place in the array.

I did that with Timer "thread" from System.Windows.Forms library (be careful, cause there is another Timer class in System.Threading -of which I'm not a fan.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900