Question or problem in the Swift programming language:
In Java we use System.currentTimeMillis() to get time, is there similar method in iOS?
How to solve the problem:
NSDate().timeIntervalSince1970 * 1000
You could use:
“The interval between the date object and 00:00:00 UTC on 1 January 1970.”
If we are talking about taking the time with miliseconds, I’d use
CACurrentMediaTime(). Consider that the miliseconds are the fractional part.