start-- starts the timer.
stop-- stops the timer and makes results available.
snapshot-- makes current time results available, but does not stop timing.
reset-- resets the elapsed times to zero. Does not clear a pending
The timing information is thread-specific, and in order to get meaningful results,
stop must be called from the same thread.
The underlying mechanism is the Win32 call
GetThreadTimes, which returns the
amount of time spent actually exeuting this thread. Time spent in other threads during time-slicing does
not count, and time spent sleeping or blocked does not count.
get_user-- time spent in user mode (normal code).
get_kernel-- time spent in kernel mode (device drivers).