[linux-audio-dev] high-res time measurement?
joq at io.com
Thu May 29 18:59:00 UTC 2003
"jacob robbins" <jrobbins at newyorkmusicunion.com> writes:
> I'm a little green at time measurement facilities available in linux,
> 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
> too big for this purpose. Is there any way to do this? Is there a
> high-res time howto?
I've been using jack_frame_time() for tracing audio threads in a JACK
client. It works quite well. Basically you get a running frame
counter (unsigned long) which can be used to compute the difference
from an earlier measurement. The resolution depends on the JACK
sample rate, which is typically either 1/48000 sec or 1/44100 sec.
If you're using JACK anyway, this is an easy solution.
There are lots of other facilities available. I'm sure others will
explain their advantages and disadvantages. :-)
Austin, Texas, USA
More information about the Linux-audio-dev