关于 GetProcessTimes方法的使用
我想得到进程的运行时间,我知道使用GetProcessTimes这个函数,但我不会用,有谁能告诉我一下怎么用吗?
最好能给个示例代码。
GetProcessTimes
The GetProcessTimes function obtains timing information about a specified process.
BOOL GetProcessTimes(
HANDLE hProcess, // specifies the process of interest
LPFILETIME lpCreationTime, // when the process was created
LPFILETIME lpExitTime, // when the process exited
LPFILETIME lpKernelTime, // time the process has spent in kernel
// mode
LPFILETIME lpUserTime // time the process has spent in user mode
);