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

Re: Monitoring system time


  • Subject: Re: Monitoring system time
  • From: Adam Leonard <email@hidden>
  • Date: Sun, 29 May 2005 23:03:22 -0700

Or another way that I use is to use NSCalendarDare to calculate the seconds between the current date and a date x days from the current date. Then set a NSTimer to that interval. Then reset the timer on launch, on wake from sleep (since NSTimer doesn't count when the computer is sleeping) and when the timer fires.

The advantage to this method is you can have it fire at any time you want, but rarely check / reset the timer.

You can get the day of the week using NSCalendarDate's dayOfWeek method
_______________________________________________
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


References: 
 >Monitoring system time (From: Jerry Brace <email@hidden>)
 >Re: Monitoring system time (From: Shawn Erickson <email@hidden>)
 >Re: Monitoring system time (From: Jerry Brace <email@hidden>)
 >Re: Monitoring system time (From: j o a r <email@hidden>)

  • Prev by Date: Re: Exception raised during posting of notification
  • Next by Date: Urgent build problem
  • Previous by thread: Re: Monitoring system time
  • Next by thread: Re: Monitoring system time
  • Index(es):
    • Date
    • Thread