c++ “GetThreadTimes” but with a better resolution

匿名 (未验证) 提交于 2019-12-03 08:57:35

问题:


Is there a method with a better resolution than 100us that can get me the total time a thread was working (without the time it was sleeping or waiting).
thanks :)

回答1:

You could use QueryThreadCycleTime(), it counts cpu cycles. You can't do better than that. Available in Vista and up. It doesn't count sleep nor wait time, I verified on Win7.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!