On 07/20/2010 01:06 AM, Louigi Verona wrote:
>
>
> Hey guys!
>
> Some time ago I have asked someone to look into Kluppe and add a couple of
> features.
> My request was not ignored and Patrick Shirkey was kind enough to volunteer
> to try to help.
>
> However, he came upon a difficulty and that is - *how do you set up an
> asynchronous timer in C?*
It depends what you need that timer for.
In gtk there's a g_timeout_add(). easy to use.
To writing your own:
`apropos pthread` and more specifically `man pthread_create`.
usleep() sleeps at least, and select() sleeps at most a certain period
of time. http://freej.dyne.org/codedoc/fps_8cpp_source.html line 132ff
has examples of both.
For [more] accurate timing: RTC or HPET. Example code comes
with the kernel:
linux-2.6/Documentation/rtc.txt
linux-2.6/Documentation/hpet.txt
There's a couple of other options fi. if you want to sync
hardware-devices using IRQs.. and the jack_process_callback is also very
good timer :)
> It stopped right there. I was wondering if anyone could help us with that
> matter?
>
>
> Cheers!
>
-- Robin Gareus mail: robin@email-addr-hidden site: http://gareus.org/ chat: xmpp:rgareus@email-addr-hidden blog: http://rg42.org/ lab : http://citu.fr/ Public Key at http://pgp.mit.edu/ Fingerprint : 7107 840B 4DC9 C948 076D 6359 7955 24F1 4F95 2B42 _______________________________________________ Linux-audio-dev mailing list Linux-audio-dev@email-addr-hidden http://lists.linuxaudio.org/listinfo/linux-audio-devReceived on Tue Jul 20 04:15:02 2010
This archive was generated by hypermail 2.1.8 : Tue Jul 20 2010 - 04:15:02 EEST