Is there a way to get system uptime in iOS (using Swift)? What I need is to measure time without having to worry about the user changing the time. In Android there\'s a
This is a solution in Swift 4.
var boottime = timeval() var size = MemoryLayout.stride sysctlbyname("kern.boottime", &boottime, &size, nil, 0)