swift5 10位时间戳写法:(秒级)
let time = (NSDate().timeIntervalSince1970)
let timeStr = String(format:"%0.f", time)
swift5 13位时间戳写法:(毫秒级)
let time = (NSDate().timeIntervalSince1970 *1000)
let timeStr = String(format:"%0.f", time)
swift5 10位时间戳写法:(秒级)
let time = (NSDate().timeIntervalSince1970)
let timeStr = String(format:"%0.f", time)
swift5 13位时间戳写法:(毫秒级)
let time = (NSDate().timeIntervalSince1970 *1000)
let timeStr = String(format:"%0.f", time)
本文标题:swift 10位时间戳和13位时间戳
本文链接:https://www.haomeiwen.com/subject/gemerltx.html
网友评论