TIMEX TIMEX - 6 months ago 52
iOS Question

In Swift, how can I get the UNIX Epoc timestamp, in milliseconds?

UInt64(NSDate().timeIntervalSince1970)


This only gets the timestamp in seconds, but not milliseconds.

Answer

Multiply by 1000.

UInt64(NSDate().timeIntervalSince1970 * 1000.0)