user2636197 user2636197 -4 years ago 323
Swift Question

Swift ios 10 digit unix timestamp

I wonder how I can create a 10 digit unix timestamp


will print: 1478638179.2932

I would like to only print:


Answer Source

You mean you just want the integral part of the value?

let seconds = Int(NSDate().timeIntervalSince1970)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download