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

Re: Displaying time


  • Subject: Re: Displaying time
  • From: Thomas Davie <email@hidden>
  • Date: Fri, 22 Aug 2008 15:45:35 +0200


Using a timer isn't too bad. Running at two updates per second should be acceptable since you're sampling at twice the highest "event" frequency. You might want to go a bit faster and maybe at a slightly odd multiple of one second to make sure you don't end up with a constant half-second lag.
I think, that a higher event-frequency is not neccessary. He should use an interval of close to one second (something like 0.99 seconds). In his timer method he simply waits in a loop for the "tick tack" and displays the result. So he will not have a constant phase shift (except of the drawing interval).

If the system becomes busy (his application doesn't sound like that), he maybe misses a second. That is acceptable if the system is busy.

He would miss a second every 100 seconds, whether the system was busy or not, as the timer fires, finds the time hadn't changed, and goes back to sleep for another 0.99 seconds.


Bob
_______________________________________________

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: Displaying time
      • From: Negm-Awad Amin <email@hidden>
References: 
 >Re: Displaying time (From: Gregory Weston <email@hidden>)
 >Re: Displaying time (From: Ron Fleckner <email@hidden>)
 >Re: Displaying time (From: Graham Cox <email@hidden>)
 >Re: Displaying time (From: Negm-Awad Amin <email@hidden>)

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