Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Realtime Programing on MacOSX



*This message was transferred with a trial version of CommuniGate(tm) Pro*
Folks,

I am in the process of working out some real time code (user land) for OSX for VoIP applications and I have a few questions about how timers are implemented.

I have a requirement that my thread wake up every 20ms no matter what. When I create timer using setitimer() it does indeed fire within about 1ms. The only problem is that I have with this model is that the signal gets dispatched to a random thread instead of my signal handling thread.

The other approach I looked into was to just call usleep() for the proper amount of time but the accuracy is very different. With that setup I get delays of several extra ms.

Is there a better way to implement something like this?

RJ
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.