[linux-audio-dev] high-res time measurement?

Paul Davis paul at linuxaudiosystems.com
Thu May 29 19:13:01 UTC 2003

> In my host, I would like to be able to measure how much time each
>individual LADPSA plugin takes. Assuming I do realtime work with the
>smallest buffer sizes my system can handle, what options are available
>to me to measure time on this small scale? I know that the typical
>system calls time and gettimeofday have resolution of 10 ms, which is

no, gettimeofday() has microsecond resolution. on a PII-450, it takes
about 60usec to call gettimeofday(), and about 12usec to execute
inline code to read the cycle counter and then divide by a
pre-established CPU MHz. its really a lot simpler to use
getttimeofday(), but JACK (http://jackit.sf.net/) has generic code to
read the cycle timer and figure out the CPU MHz if you want to go down
that path.

>too big for this purpose. Is there any way to do this? Is there a
>high-res time howto?

no howto. most kernel people try to discourage it with claims about

More information about the Linux-audio-dev mailing list