0
我遇到了问题。自设备启动以来,我需要得到确切的TimeInterval。在CoreMotion
框架中,CMLogItem
类具有timestamp属性,它会返回设备启动后的确切时间。 (link)这是测量事件发生的准确时间所必需的。如何获得iOS设备启动后的准确时间?
我尝试下面的代码:
let timestamp = ProcessInfo.processInfo.systemUptime
但它返回不同的时间比我更需要。 任何帮助表示赞赏,在此先感谢!
感谢您的回复。 –
这里https://developer.apple.com/reference/coremotion/cmlogitem/1615939-timestamp你可以看到时间戳是从设备启动以来的时间量。 –
@AndreyM。 thx共享信息 –