• 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: Creating a small timer?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating a small timer?


  • Subject: Re: Creating a small timer?
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 9 Nov 2009 10:53:55 -0800


On Nov 9, 2009, at 9:19 AM, Michael Abendroth wrote:

How can I create such a timer?  I mean, it probably isn't very
efficient to redraw the whole view every second just to get the timer
to update.

Drawing a view once a second shouldn't be a problem. Look at all the stuff iTunes' pseudo-LCD status view updates multiple times a second while a track is playing.


It's always a good idea to tell the view to redraw only the bounding box of the area that needs to update, though.

But is creating a separate thread just for the timer necessary (I doubt that)?

Don't create a thread. Use an NSTimer.

—Jens_______________________________________________

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


References: 
 >Creating a small timer? (From: Michael Abendroth <email@hidden>)

  • Prev by Date: Re: Cocoa Sounds
  • Next by Date: Re: NSString of selected text in NSTextView
  • Previous by thread: Re: Creating a small timer?
  • Next by thread: Less verbose way to localize a string with a default value?
  • Index(es):
    • Date
    • Thread