On Mon, 24 Jan 2005 15:08:56 +0100, you wrote:
How bad is it to use the gettimeofday() method?
In my opinion, the RTDSC method should be suppressed from the code and we should always use the 'gettimeofday' method (despite the penalty hit of a syscall).
I was more concerned about the accuracy of gettimeofday (not incrementing in usec's). So I did a small test and I find it behaves very nicely.
That was the only reason I could see to justify the rdtsc method, so here it goes. As the cpuHz variable is not used anymore, we might as well move it to ntdll.
Changelog: dlls/kernel : cpu.c dlls/ntdll : nt.c include : winternl.h
Get rid of the rdtsc cpu instruction method for calculation of the performance counter. Put the calculation (based on gettimeofday) in NtQueryPerformanceCounter() and use that in the kernel functions.
Rein.