-
-
Save nek023/5385589 to your computer and use it in GitHub Desktop.
Benchmark macros for Objective-C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __BM__ | |
#define __BM__ | |
#define BM_BEGIN(name) NSDate *__bm_##name = [NSDate date]; | |
#define BM_END(name) NSLog(@"%s: %f sec", #name, [[NSDate date] timeIntervalSinceDate:__bm_##name]); | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment