• 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: "Påhl Melin" <email@hidden>
  • Date: Fri, 5 Dec 2008 20:51:03 +0100

2008/12/5 Jean-Daniel Dupas <email@hidden>:
>
> Le 5 déc. 08 à 16:00, Påhl Melin a écrit :
>
>> 2008/12/5 Benjamin Stiglitz <email@hidden>:
>>>>
>>>> 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?
>>>
>>> alarm(3) or setitimer(2).
>>
>> setitimer(2) could be used if I calculate the relative difference
>> between multiple timer settings and resetting to the next interval
>> after each signal. Some extra work but doable. When using multiple
>> timers the alarms could possible start to drift I suppose.
>>
>> But I got the impression from Jean-Daniel Dupas, that kevent() with
>> the timer filter EVFILT_TIMER is implemented even though the man page
>> of kqueue(2) says "EVFILT_TIMER This filter is currently unsupported."
>>
>> Do you know from which OS X version kevent() timers are supported? Or
>> if they are officially supported at all?
>>
>
> They are commented out in 10.3.9 sources, and implemented in 10.4.0 sources.
> I guess than man page has not been updated at this time.

Ah, great, thanks. Then it feels safe to use kevent:s . I'm
considering to use Leopard as the minimum requirement anyway.

/ 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

References: 
 >Asynchronous timers (without a run loop) (From: "Påhl Melin" <email@hidden>)
 >Re: Asynchronous timers (without a run loop) (From: "Påhl Melin" <email@hidden>)
 >Re: Asynchronous timers (without a run loop) (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: MTOM?
  • Next by Date: Re: Asynchronous timers (without a run loop)
  • Previous by thread: Re: Asynchronous timers (without a run loop)
  • Next by thread: Re: NSTypesetter problem
  • Index(es):
    • Date
    • Thread