• 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: Keeping NSTimeInterval updated with current time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keeping NSTimeInterval updated with current time


  • Subject: Re: Keeping NSTimeInterval updated with current time
  • From: "Sean McBride" <email@hidden>
  • Date: Mon, 2 Nov 2009 18:24:55 -0500
  • Organization: Rogue Research Inc.

On 11/2/09 4:10 PM, PCWiz said:

>In my model class I have 2 properties, timeInterval and postedTime.
>postedTime contains a static date. timeInterval uses the
>timeIntervalSinceNow method to find the number of seconds that has
>passed by since the date in postedTime.

What do you mean 'static'?  If it never changes, why do you model it?

>What I want to do is around every 5 minutes, update the timeInterval
>to be consistent with the current time. The problem is that I need to
>do this update for a large number of instances of the object. One way
>I could think to do this would be to enumerate through the array
>containing the objects every 5 minutes and just set the timeInterval
>property. But is there a more efficient way to do this?

How many is "large"?  If you need to change them all, then you need to
change them all (ie you'll have to enumerate them all).  Have you
observed a performance problem because of this?

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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: Keeping NSTimeInterval updated with current time
      • From: PCWiz <email@hidden>
References: 
 >Keeping NSTimeInterval updated with current time (From: PCWiz <email@hidden>)

  • Prev by Date: Re: Keeping NSTimeInterval updated with current time
  • Next by Date: Re: Core Data design question: receiving KVO notifications of partially mutated objects
  • Previous by thread: Re: Keeping NSTimeInterval updated with current time
  • Next by thread: Re: Keeping NSTimeInterval updated with current time
  • Index(es):
    • Date
    • Thread