• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Asynchronous timers (without a run loop)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Asynchronous timers (without a run loop)
      • From: "Påhl Melin" <email@hidden>
References: 
 >Asynchronous timers (without a run loop) (From: "Påhl Melin" <email@hidden>)

  • Prev by Date: NSTimer
  • Next by Date: Re: self = [super init];
  • Previous by thread: Asynchronous timers (without a run loop)
  • Next by thread: Re: Asynchronous timers (without a run loop)
  • Index(es):
    • Date
    • Thread