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

Re: Stopwatch


  • Subject: Re: Stopwatch
  • From: Eric Brunstad <email@hidden>
  • Date: Sun, 12 Jun 2005 15:36:42 -0400


On Jun 12, 2005, at 3:12 PM, Sanri Parov wrote:

On Sun, 12 Jun 2005 11:14:42 -0700, mmalcolm crawford wrote:


Use an NSTimer instead:


<http://developer.apple.com/documentation/Cocoa/Conceptual/Timers/index.html>

Ok.
But that's not the point. When it comes to fire the timer, the whole 
interface freezes.
That's why I used a different thread.

How often to do plan to fire the timer?  In one of my applications, I fire a timer every 30th of a second, and I do not notice a substantial interface freeze.

One important consideration: From my experience I have noticed that when fired at rapid rates, the NSTimers do not always go at the exact interval they are told to go at.

For example, in a movie program I wrote, I fired the NSTimer 30 times per second.  The method the NSTimer called, however, performed complex movie functions.  As a result, what was supposed to be 30 times/sec became something like 5.

As a result, you will probably want to store the time the stopwatch started at as an instance variable and see how much time has passed each time the NSTimer has been fired.

BTW:  I'm sorry about my previous incorrect posts.  I'll be sure to check over my posts before submitting them in the future.

-Eric
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Stopwatch
      • From: Joshua Orr <email@hidden>
References: 
 >Stopwatch (From: Sanri Parov <email@hidden>)
 >Re: Stopwatch (From: mmalcolm crawford <email@hidden>)
 >Re: Stopwatch (From: Sanri Parov <email@hidden>)

  • Prev by Date: Re: Stopwatch
  • Next by Date: Re: Stopwatch
  • Previous by thread: Re: Stopwatch
  • Next by thread: Re: Stopwatch
  • Index(es):
    • Date
    • Thread