Problem in calculating ElapsedTime using Win32_perfrawdata_perfproc_process

M

meenu

Hi All,
I am trying to calculate the duration for which a process has been
running, using the member "ElapsedTime" of the WMI class,
"Win32_PerfRawdata_Perfproc_process". As per the documentation given in
MSDN, the actual value can be obtained by using the formula,

(Y-X)/ TB

where Y is the value of the member "Timestamp_Perftime"
X is the value of the member "ElapsedTime" and
TB is the value of the member "Frequency_PerfTime"


But while debugging, I find that "ElapsedTime" gives the time when the
process started, in FILETIME, i.e with reference to Jan 1, 1601, while,
"Timestamp_PerfTime", just gives the CPU timestamp. Hence I dont get
the proper result. Is it possible to convert CPU timestamp also to
FILETIME or is there anything else wrong here? Can anybody plsss help
me?



Thanks,
meenu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top