What unit of time does timeIntervalSinceDate return?
Solution 1:
It returns the number of seconds, as an NSTimeInterval
value.
From this documentation page:
NSTimeInterval is always specified in seconds; it yields sub-millisecond precision over a range of 10,000 years.
Solution 2:
Well the NSDate
docs show the function prototype as:
- (NSTimeInterval)timeIntervalSinceDate:(NSDate *)anotherDate
And the Foundation Data Types doc states:
NSTimeInterval is always specified in seconds; it yields sub-millisecond precision over a range of 10,000 years.