Quantcast
Viewing all articles
Browse latest Browse all 8

Answer by Raj for Getting time elapsed in Objective-C

use the timeIntervalSince1970 function of the NSDate class like below:

double start = [startDate timeIntervalSince1970];double end = [endDate timeIntervalSince1970];double difference = end - start;

basically, this is what i use to compare the difference in seconds between 2 different dates. also check this link here


Viewing all articles
Browse latest Browse all 8

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>