On Tue, 16 Apr 2002 09:34:21 -0400 Paul Davis <[EMAIL PROTECTED]> wrote:
> >I need to do some timing code - for some basic kind of sequencing.. > > [..] > >What approaches have people used, and how successful were they? > > poll(2) on /dev/rtc. You will need to be root, or have CAP_RESOURCE, > to set the frequency of the clock to a useful value, and you will need > to run SCHED_FIFO to not have the kernel scheduler mess things up. Cool, thanks (and rob!) A quick aside - should /dev/rtc be user readable? On my system (with devfs) its not, i just wondered whether the same was true for other systems? if i'm not root, i can still set the clock to 64Hz, how bad is that for timing? (not great, i imagine.) say for doing a step sequencer, i think i could get away with that, and use the higer rate if possible. > ardour and softwerk (which doesn't compile right now) both have code ah, its not just me then ;-) > for the RTC. In fact, I'll include ardour's below - its very simple > really. Any parts that are not clear are almost certainly not > necessary :) > alternatively, use the ALSA sequencer and/or timer APIs. worth a look, i just wish the docs were a bit friendlier.. cheers, NickD d-.-b