I use this code to keep track of last reboot:
+ (float) secondsSinceLastReboot{ return ((float)(mach_absolute_time())) * ((float)timebase.numer) / ((flo
If you don't care a lot about computation time you can use simple Obj-C class from Foundation
NSTimeInterval systemUptime = [[NSProcessInfo processInfo] systemUptime];