Re: Time elapsed how-to ?
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.