如何检索 win32 进程中在用户模式下花费的时间
我知道 GetProcessTimes
可用于检索进程在用户模式下花费的时间(而不是在内核模式下花费的时间或挂起的时间)。 不幸的是,分辨率似乎只有16ms(与GetTickCount
相同)。
有没有办法更精确地检索时间?
I know that GetProcessTimes
can be used to retrieve the time a process spent in user mode (as opposed to the time it spent in kernel mode or the time it was suspended). Unfortunately, it seems that the resolution is only 16ms (the same as GetTickCount
).
Is there a way to retrieve the time with greater precision?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看 QueryPerformanceCounter 函数。 但我听说它在多核环境中存在问题,但不确定。
Take a look at QueryPerformanceCounter function. But I have heard that it has problems in multi core environments, not sure though.