TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Sep 2015 |
Maintained by Dale Myers.
A simple Objective-C timer for timing code
#import <DMTime.h>
...
[DMTime startTimer:@"Some key"];
// Some long running process
DMTimeResult *result = [DMTime endTimer:@"Some key"];
NSLog(@"Code took %f seconds", [result seconds]);
Or if you prefer blocks:
DMTimeResult *result = [DMTime timeBlock:^{
// Some long running process
}];
NSLog(@"Code took %f milliseconds", [result milliseconds]);
DMTime is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "DMTime"
DMTime is available under the MIT license. See the LICENSE file for more info.