If you want to benchmark/time your code in Cocoa, you can use:
The ActionScript’s getTimer() equivalent in Cocoa article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.
NSTimeInterval t = [NSDate timeIntervalSinceReferenceDate];
// Your code here
NSLog(@"Took %f seconds", [NSDate timeIntervalSinceReferenceDate] - t);
From: Time how long it takes your Cocoa code to do something.
The ActionScript’s getTimer() equivalent in Cocoa article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.

Add Your Comment