[sldev] QueryPerformanceCounter()
Dzonatas
dzonatas at dzonux.net
Thu May 31 21:47:33 PDT 2007
Thomas Rowland wrote:
> Available to all via google 'rdtc' is;
> http://www-unix.mcs.anl.gov/~kazutomo/rdtsc.html
> <http://www-unix.mcs.anl.gov/%7Ekazutomo/rdtsc.html>
> Which also gives a PPC equiv. function, and is as good as any.
> There are energy saving CPU clock frequency changes on some systems.
> Hopefully this would be negated by the intensity of CPU load prior to
> the call.
> Perhaps it would be prudent to also attempt a rough 'call overhead'
> measurement & adjustment.
That will solve the main concern related directly with rdtsc. Between
that and the code Paul contributed, that is very helpful.
It appears gettimeofday() is pretty consistent, submillisecond, and
portable enough to use on Linux for a high precision timer in the
likeness of QueryPerformanceCounter().
If we just want to measure frequency, the overhead of gettimeofday() is
fine. If we need a fast time grab and store, then we have to use
something like rdtsc.
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/sldev/attachments/20070531/32676963/attachment.htm
More information about the SLDev
mailing list