Quantcast
Viewing all articles
Browse latest Browse all 10386

Development : Get thread execution times

Author: thebuildguy
Subject: Get thread execution times
Posted: 18 October 2014 at 1:57am

I am working in C#, trying to dig out useful information about each of the threads of a particular process.  I'm currently trying to emulate the !runaway command in cdb/windbg where it displays the threadOrdinal/OSThreadId and the amount of time that thread has been executing, but I've been unable to do so.  I thought maybe it was just a matter of getting the thread's creation date/time and just calculating the amount of time that has since elapsed; but my testing is showing that's not accurate.  I've looked at the NtQueryInformationThread function, but most of the examples I see floating around show you how to get the start address of the thread...so, I'm not sure if this is the correct path or not, and if so, how to proceed to get the threadOrdinal and the amount of time the thread has been executing.  Any help is appreciated!  Thanks!

Viewing all articles
Browse latest Browse all 10386

Trending Articles