I'm trying to find the difference between two NSDates. This worked once and printed the difference, but has never worked again. I don't remember changing any thing after the one time it worked. Any ideas? Oh, and it doesn't throw an error, and if I comment out this snippet everything works.
//----------- Touches Begin
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
touchBegins = [NSDate date];
NSLog (@" Tap: %d ", tapTotal);
NSLog (@"<=========================>");
NSLog (@"Method: touchesBegines & Ends");
NSLog (@" Touch Begin: %@", touchBegins);
// [self updateLabelsFromTouches:touches];
}
//----------- Touches End
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
touchEnds = [NSDate date];
NSLog (@" Touch Ends : %@", touchEnds );
@try {
NSLog(@"%@", touchEnds);
NSTimeInterval elapsed = [touchEnds timeIntervalSinceDate:touchBegins];
NSLog (@" Finger Down: %f", elapsed);
} @catch (NSException *ex) {}
NSLog (@" ");
[self updateLabelsFromTouches:touches];
}
Console:
[Session started at 2010-10-27 10:27:18 -0400.]
Tap: 0
<=========================>
Method: touchesBegines & Ends
Touch Begin: 2010-10-27 14:27:22 GMT
Touch Ends : 2010-10-27 14:27:22 GMT