On iOS, how to get current time like System.currentTimeMillis () in java?

In Java, we use System.currentTimeMillis () to get the time, is there a similar method in iOS?

+5
source share
2 answers
NSDate().timeIntervalSince1970 * 1000 
+7
source

You can use: NSDate().timeIntervalSince1970

"The interval between the date object and 00:00:00 UTC on January 1, 1970.

0
source

Source: https://habr.com/ru/post/1243465/


All Articles