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.