Created
November 21, 2014 07:36
-
-
Save nori3tsu/39d1769e4bc7c6bbdfb2 to your computer and use it in GitHub Desktop.
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
#import "Timer.h" | |
NSDate *startDate; | |
NSDate *endDate; | |
@implementation Timer | |
- (id)initWithStart { | |
self = [super init]; | |
startDate = [NSDate date]; | |
return self; | |
} | |
-(NSInteger)stop { | |
endDate = [NSDate date]; | |
NSInteger elapsed = [endDate timeIntervalSinceDate:startDate] * 1000; | |
return elapsed; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment