I need to get the time elapsed between two events, for example, the appearance of a UIView and the user's first reaction.
How can I achieve it in Objective-C?
NSDate *start = [NSDate date]; // do stuff... NSTimeInterval timeInterval = [start timeIntervalSinceNow];
timeInterval is the difference between start and now, in seconds, with sub-millisecond precision.
timeInterval
1.4m articles
1.4m replys
5 comments
57.0k users