Monitor CPU usage in thread on a Windows mobile device

Is it possible to programmatically (C ++) measure a processor on a stream on a Windows mobile device (or CE 5)? If not, is this their utility that will control the CPU usage of the process?

+3
source share
2 answers

CPU usage cannot be directly measured because, unlike x86, the ARM processor does not have a register for it. You can calculate it using the Toolhelp API to get a list of processes and their child threads, and then use GetThreadTimes to find out how long each thread uses.

Keep in mind that doing this calculation directly affects how much processor is used.

+5
source

Someone wrote a tool that is very similar to a task manager on a PC: http://www.vttoth.com/LPK/taskmanager.html

As ctacke says, it looks like it uses a lot of CPU. He reports that he uses about 15% -30% of our processor on our 800 MHz ARM device.

+4

Source: https://habr.com/ru/post/1705596/


All Articles