Subject: Re: [linux-audio-dev] best method for timing
From: rm (async_AT_cc.gatech.edu)
Date: Tue Apr 16 2002 - 16:39:21 EEST
On Tue, Apr 16, 2002 at 01:27:49PM +0000, Nick D wrote:
> Hi all,
>
> I need to do some timing code - for some basic kind of sequencing..
> Since ive not written this kind of stuff before, i'm unsure as to the best approach for accurate timing.
>
> I've played around with using signals for this - with setitimer(..) and then catching the signal, but it doesnt look too good - it can be 1000s of usecs out..
> What approaches have people used, and how successful were they?
last time i tried this sort of thing (way back when), i used the
real-time timer set at a higher resolution (1KHz) and then just spun
in a loop reading it until the next event.
on the downside it was ugly. on the upside it was quite stable, even
under load.
rob
---- Robert Melby Georgia Institute of Technology, Atlanta Georgia, 30332 uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt4255a Internet: async_AT_cc.gatech.edu
This archive was generated by hypermail 2b28 : Tue Apr 16 2002 - 16:25:56 EEST