Last active
August 29, 2015 13:58
-
-
Save Shilo/10351308 to your computer and use it in GitHub Desktop.
Objective-C macros for timing processes.
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
#define TIMER_START() CFAbsoluteTime timer_startTime = CFAbsoluteTimeGetCurrent(); | |
#define TIMER_STOP() (CFAbsoluteTimeGetCurrent() - timer_startTime); | |
#define TIMER_STOP_AND_LOG(prefixString) CFAbsoluteTime timer_endTime = TIMER_STOP(); NSLog(@"%@%f", ((prefixString)?prefixString:@""), timer_endTime); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment