• 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: Time elapsed how-to ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Time elapsed how-to ?


  • Subject: Re: Time elapsed how-to ?
  • From: Ondra Cada <email@hidden>
  • Date: Tue, 14 May 2002 03:36:36 +0200

On Monday, May 13, 2002, at 07:55 , Francis bouchard wrote:

startDate=[[NSDate date] retain];

.....

elapsedTime= - [startDate timeIntervalSinceNow];


Why the retain ?

Most probably since the original writer (a) did not understand Cocoa memory management well, or (b) thought that you might want to measure intervals spanning more events (in which case though the last line should (auto)release startDate).
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >Re: Time elapsed how-to ? (From: Francis bouchard <email@hidden>)

  • Prev by Date: Re: Document with multiple windows
  • Next by Date: Re: referring to global windows
  • Previous by thread: Re: Time elapsed how-to ?
  • Next by thread: Re: Time elapsed how-to ?
  • Index(es):
    • Date
    • Thread