本文介绍了需要计算在Application后面运行的特定进程的CPU使用率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的机器上运行了一个进程。我需要在C#中计算该特定进程的CPU使用率。除了Visual Studio之外,运行过程是一个完全独立的过程。我认为这可以通过使用 ManagementObjectSearcher 类的System.Management命名空间来实现,但我无法编写代码来执行此操作。
I have a process running in my machine.I need to calculate the CPU usage of that particular process in C#. The running process is a totally separate process apart from the Visual Studio. I think this could be achieved by using ManagementObjectSearcher class of System.Management namespace, but I am unable to write code to do it.
推荐答案
这篇关于需要计算在Application后面运行的特定进程的CPU使用率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!