Created
October 1, 2012 16:09
-
-
Save C4Code/3812746 to your computer and use it in GitHub Desktop.
How to get yourself an interval of time...
This file contains hidden or 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
// | |
// C4WorkSpace.m | |
// timeInterval | |
// | |
// Created by moi on 12-09-30. | |
// Copyright (c) 2012 moi. All rights reserved. | |
// | |
#import "C4WorkSpace.h" | |
@implementation C4WorkSpace { | |
NSDate *start, *end; | |
} | |
-(void)touchesBegan { | |
start = [NSDate dateWithTimeIntervalSinceNow:0]; | |
} | |
-(void)touchesEnded { | |
end = [NSDate dateWithTimeIntervalSinceNow:0]; | |
CGFloat interval = [end timeIntervalSinceDate:start]; | |
C4Log(@"You touched the screen for %4.2f seconds",interval); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment