Krzysztof Mossakowski
Windows Programming
2008 - Tasks
CPU usage
Demonstration
Description:
Real time CPU usage graph
Functionality:
Graph is updated every single second
Actual CPU usage value is presented in the window's caption
Graph features:
graph is scaled to the window's height (0% - bottom of the client area, 100% - top of the client area)
horizontal scale is constant, one value per pixel
new measures are added at the right edge of the graph
measure history should be enough to show maximized window
Hints:
GetSystemTimes(), __int64
CPU usage formula:
(kernelTime + userTime - idleTime) / (kernelTime + userTime) * 100
Links for uploading:
Solutions