Re: Asynchronous timers (without a run loop)
Re: Asynchronous timers (without a run loop)
- Subject: Re: Asynchronous timers (without a run loop)
- From: Nathan Day <email@hidden>
- Date: Thu, 04 Dec 2008 22:39:33 +1100
NSRunLoop use to be based on the function select() (it was in GnuStep
anyway), it waits for inputs but also has a single timeout value also,
NSRunLoop works out how long the timeout value should be for the
shortest NSTimer. If you want to wait on multiple timers without using
run NSRunLoop then you will have to implement this kind of
functionality yourself. You can then just use sleep() to make your
thread wait.
On 04/12/2008, at 9:32 PM, Påhl Melin wrote:
I need to use timers in a low level library where I need to specify
asynchronous callbacks to a timer function. I will not have any run
loop so I cannot use NSTimer. Are there any low level timer API to use
instead? I haven't found anything useful (yet) on google nor ADC. I
assume there must exist some Mach or BSD level API:s that can be used?
Any suggestions?
/ Påhl
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden