有没有办法在你的 iPhone 应用程序中维护滴答计数:
- 独立于系统时钟
- 不受设备 sleep 影响(与 CACurrentMediaTime()、UpTime() 等不同)
最佳答案
尝试这个类,它将访问设备上的 Mach 内核时间(类似于系统启动后的滴答计数) https://github.com/maddox/cocoaheads_gltouches/blob/master/Classes/MachTimer.m
关于iPhone 应用程序系统时钟和 sleep 独立滴答计数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3961688/