Waldek Hebisch wrote:
My experience was that real time is more accurate then CPU time.
On a single-user system with no background processes running, this might be true. (At least one of the conditions is usually not fulfilled when I'm doing something ... ;-)
When the computer is idle except for this program, I get: Time for 100000000 randNorms: 171.03 seconds, 171 cpu seconds.
When I'm checking email, opening files, etc., I get: Time for 100000000 randNorms: 202.29 seconds, 202 cpu seconds.
What am I doing wrong here - or is GetCPUTime not working?
That looks very strange. Other processes may increase your CPU time (if you have heavy cache trashing), but to trash the cache some CPU time have to happen outside your process. I have seen systematic errors, but nothing of that magnitude...
BTW (to OP), which system is this?
Frank