[linux-audio-dev] about MIDI timing...

Stephen Cameron smcameron at yahoo.com
Wed Oct 25 14:02:51 UTC 2006


--- Stephen Sinclair <radarsat1 at gmail.com> wrote:

[...]
> 
> By the way, there are more ways to time things than just *sleep().
> For example, using sigalrm and setitimer.

>From the sleep(3) man page:

BUGS
       sleep()  may be implemented using SIGALRM; mixing calls to alarm() and
       sleep() is a bad idea.

Not that there aren't more ways, just that using sleep() and 
and using SIGALRM aren't necessarily different ways.  It says
"may be", but on linuxes I know, sleep() _is_ implemented
via SIGALRM, I'm pretty sure.  (Somebody correct me if I'm
wrong about that.)

And setitimer also uses SIGALRM, if you use it for real
(wall clock) time, so it's not really a different way 
either.

Well, I guess there is the difference that the process isn't
necessarily put to sleep if you don't call sleep(), but the
timing mechanism is, so far as I know, the same in all three.

-- steve


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Linux-audio-dev mailing list