2008/12/5 Jean-Daniel Dupas <[EMAIL PROTECTED]>:
>
> Le 5 déc. 08 à 16:00, Påhl Melin a écrit :
>
>> 2008/12/5 Benjamin Stiglitz <[EMAIL PROTECTED]>:
>>>>
>>>> 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to