开发者

C++ thread waiting times

Is there a way to get the time a thread has been WAITING during its life (in C++/windows)? (I've asked before about the working time, but getting the waiting time would be much better :) )

Using GetThreadTimes is not enough for me because I need a high resultion (way better than 100 microsec, more towards 5-10 microsec or even开发者_如何学编程 less.


  1. Call GetThreadTimes().
  2. Add together kernel time and user time.
  3. Subtract creation time from now.
  4. Subtract value found in step 2 from that found in step 3 and you have your answer.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜