iPhone app system clock & sleep independent tick count
Is there any way to maintain a tick count in your iPhone app which is开发者_如何学Go :
- independent of system clock
- is not impacted by device sleep (unlike CACurrentMediaTime(), UpTime() etc.)
Try this class, it will access the Mach kernel time on the device (kind like tick count since system boot) https://github.com/maddox/cocoaheads_gltouches/blob/master/Classes/MachTimer.m
精彩评论