In iOS how to get current time like System.currentTimeMillis() in java?
If we are talking about taking the time with miliseconds, I'd use CACurrentMediaTime()
. Consider that the miliseconds are the fractional part.
NSDate().timeIntervalSince1970 * 1000
You could use:
NSDate().timeIntervalSince1970
"The interval between the date object and 00:00:00 UTC on 1 January 1970."