Re: Asynchronous timers (without a run loop)
Re: Asynchronous timers (without a run loop)
- Subject: Re: Asynchronous timers (without a run loop)
- From: Jean-Daniel Dupas <email@hidden>
- Date: Sat, 6 Dec 2008 10:31:59 +0100
Le 6 déc. 08 à 00:22, Påhl Melin a écrit :
2008/12/5 Sherm Pendley <email@hidden>:
On Dec 5, 2008, at 3:16 PM, Påhl Melin wrote:
2008/12/5 Sherm Pendley <email@hidden>:
You'd have far, far less trouble programming for the Mac if you'd
simply
learn how Cocoa works, instead of trying to reinvent .NET in
Objective-C.
When in Rome, do as the Romans do.
That's why I asked in the first place. I didn't know how Cocoa works
in regards to timers.
I understand that - and it's a good point. But consider how you
asked the
question. If you don't know how Cocoa works, how is it that you've
already
decided that you shouldn't use a run loop? That's putting the cart
in front
of the horse, IMHO. The fact that you don't use a run loop to build
timers
with some other framework doesn't imply that you shouldn't do so
when you're
using Cocoa.
I didn't really decide I shouldn't use a run loop for the timers. I am
porting a library from another platform and just wanted a quick answer
if I could get a similar timer API behavior in either Cocoa, Core
Foundation or BSD Unix (with a preference on low-level for
efficiency),
What make you think lower level mean more efficient ?
Just do it the simple way (CFRunLoopTimer) and if it not efficient
enough (after profiling, and testing), think about an other way to do
it.
But you will hardly find a difference between CFRunLoopTimer which are
a very thin wrapper in mach timers, and kevent's timers.
_______________________________________________
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