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
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