Reputation: 3627
In core motion, data is returned in a class inheriting from CMLogItem
, which has a timestamp
property. The timestamp
is a TimeInterval
that is the time since the device booted.
How do I get when the device booted?
Upvotes: 3
Views: 1519
Reputation: 3627
From the comments, I was able to find ProcessInfo.processInfo.systemUptime
which is the time since last boot. From this, and Date()
, I can get the time of start via:
time_of_last_boot = Date() - ProcessInfo.processInfo.systemUptime
Upvotes: 5