• 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
NSTimer in main NSRunLoop v. InstallEventLoopTimer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSTimer in main NSRunLoop v. InstallEventLoopTimer
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Cocoa-dev Digest, Vol 5, Issue 1598
  • Next by Date: Re: NSInvocation
  • Previous by thread: Re: OT: Installing Apps
  • Next by thread: Re: NSTimer in main NSRunLoop v. InstallEventLoopTimer
  • Index(es):
    • Date
    • Thread