Skip to content

Instantly share code, notes, and snippets.

@pixelrevision
Created April 1, 2011 21:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pixelrevision/898894 to your computer and use it in GitHub Desktop.
Save pixelrevision/898894 to your computer and use it in GitHub Desktop.
Will check the time of method execution
- (void)someMethod{
StartTimeLog
// do some stuff
EndTimeLog
}
#define StartTimeLog NSDate *methodStart = [NSDate date];
#define EndTimeLog NSDate *methodFinish = [NSDate date]; printf("time elapsed was: %f\n", [methodFinish timeIntervalSinceDate:methodStart]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment