Re: Newbie simple question - Get Time
Re: Newbie simple question - Get Time
- Subject: Re: Newbie simple question - Get Time
- From: Denis Stanton <email@hidden>
- Date: Wed, 9 Apr 2003 20:29:51 +1200
On Wednesday, April 9, 2003, at 07:27 PM, Sebastien TOPIN wrote:
I just need to know how to get the current time with Cocoa. I want to
measure
time used for a calculation.
If you put an NSLog message before and after the section you want to
time you can read the times from the output log. Unfortunately
printing out the NSLog message takes significant time so you shouldn't
put any log messages like this inside the section you are timing.
NSLog(@"starting now");
<my code>
NSLog(@finished");
will produce something like this in the top right panel of Project
Builder
2003-04-09 20:23:45.204 MyApp[1217] starting now
2003-04-09 20:23:45.357 MyApp[1217] finished
The lines above give the time down to milliseconds.
Denis
_______________________________________________
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.