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.
- Call GetThreadTimes().
- Add together kernel time and user time.
- Subtract creation time from now.
- Subtract value found in step 2 from that found in step 3 and you have your answer.
精彩评论