views:

96

answers:

1

I know that GetProcessTimes can be used to retrieve the time a process spent in user mode (as opposed to the time it spent in kernel mode or the time it was suspended). Unfortunately, it seems that the resolution is only 16ms (the same as GetTickCount).

Is there a way to retrieve the time with greater precision?

A: 

Take a look at QueryPerformanceCounter function. But I have heard that it has problems in multi core environments, not sure though.

Naveen
Naveen, thank you for answering. Unfortunately, I'm trying to get the time that the process spent in *user mode* (as opposed to the time it spent in kernel mode or the time it was suspended). QueryPerformanceCounter does not provide that.
avakar