• 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: NSTimer Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTimer Problem


  • Subject: Re: NSTimer Problem
  • From: Brendan Younger <email@hidden>
  • Date: Sun, 12 May 2002 16:01:17 -0400

On Sunday, May 12, 2002, at 01:41 PM, Doug Brown wrote:

I'm having what seems to be a very simple problem with NSTimers. I have a timer set up to repeatedly fire, but when I hold down the mouse on a button in the window, or on the "minimize" button at the top of the window, the timer stops firing. Is there a way to get it to keep firing even when the user is holding down the mouse on one of these buttons? By the way, bringing down a menu from the menu bar does not make it pause. Any ideas?

At a low level the timer is still firing, it's just that the UI thread is consuming all incoming events and trashing all of the ones which have nothing to do with the task at hand (such as hitting the close or minimize buttons). Try placing your timer and your update code in a different thread. There's no guarantee that your secondary thread will always get enough processor time to keep pace with the timer, but timer events have fairly high priority so there's a good chance the Mach scheduler will give you what you want.

Brendan Younger
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSTimer Problem
      • From: email@hidden
References: 
 >NSTimer Problem (From: Doug Brown <email@hidden>)

  • Prev by Date: Re: Using Unix commands
  • Next by Date: Re: NSTableView and Java
  • Previous by thread: Re: NSTimer Problem
  • Next by thread: Re: NSTimer Problem
  • Index(es):
    • Date
    • Thread