[Kst] Timing functions...
George Staikos
staikos at kde.org
Wed Dec 15 21:15:32 CET 2004
On Wednesday 15 December 2004 15:13, Andrew Walker wrote:
> Rather than using QTimer for benchmarking would it not be more accurate
> to use the clock() function, as this measures elapsed CPU time for the
> current process, rather than absolute elapsed time (which I would imagine
> can vary wildly depending on what else the processor feels like doing).
I send Barth a note about this as well. He has a point with QTimer though.
Actually both numbers have meaning, but what he is concerned with is how long
it takes in real time to do various thing, relatively. There are factors
that affect this which aren't visible in clock(): mutexes.
I regularly do profiling with tools that count cycles too. QTimer sometimes
points out things I don't see.
--
George Staikos
KDE Developer http://www.kde.org/
Staikos Computing Services Inc. http://www.staikos.net/
More information about the Kst
mailing list