NSTimer in main NSRunLoop v. InstallEventLoopTimer
NSTimer in main NSRunLoop v. InstallEventLoopTimer
- Subject: NSTimer in main NSRunLoop v. InstallEventLoopTimer
- From: "Wesley Smith" <email@hidden>
- Date: Wed, 10 Sep 2008 02:19:29 -0700
Hi,
I'm trying to figure out how I can have my app run a timer that never
suspends when the user interacts with menus and the like. In Carbon,
one can do:
EventLoopRef mainLoop;
EventLoopTimerUPP timerUPP;
EventLoopTimerRef theTimer;
mainLoop = GetMainEventLoop();
timerUPP = NewEventLoopTimerUPP(TimerAction);
InstallEventLoopTimer (mainLoop,
1*kEventDurationMillisecond,
1*kEventDurationMillisecond,
timerUPP,
NULL,
&theTimer);
To achieve this. NSTimer doesn't seem to behave the same way and I
don't see any methods that would modify such behavior. Is there a way
to get a behavior like InstallEventLoopTimer in Cocoa?
thanks,
wes
_______________________________________________
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