一个线程的CPU使用情况 [英] cpu usage of a thread

查看:155
本文介绍了一个线程的CPU使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何让一个线程的CPU占用率在.NET中使用C#

how to get the cpu usage of a thread in .net in c#

推荐答案

检查<一href="http://stackoverflow.com/questions/1393006/how-to-get-the-cpu-usage-per-thread-on-windows-win32">How让每个线程CPU使用率在Windows(win32)中和的 GetThreadTimes 你可以使用 PInvoke的了解这一点。在SO另一个类似的帖子:<一href="http://stackoverflow.com/questions/934497/how-can-i-get-cpu-usage-and-or-ram-usage-of-a-thread-in-c-managed-$c$c">How我可以让CPU使用率和/或C#(管理code)一个的的内存使用情况如何?因此,这是重复的。

Check How to get the cpu usage per thread on windows (win32) and GetThreadTimes you can use PInvoke for that. Another similar post on SO: How can I get CPU usage and/or RAM usage of a THREAD in C# (managed code)? So this is duplicate.

这篇关于一个线程的CPU使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆