既然 iPhone 4S 据报道有 800MHz 时钟,那么计时器的粒度可能是 200MHz(5 秒)?有人知道最短的循环周期是多少吗?
最佳答案
Because of the various input sources a typical run loop manages, the effective resolution of the time interval for a timer is limited to on the order of 50-100 milliseconds. If a timer’s firing time occurs during a long callout or while the run loop is in a mode that is not monitoring the timer, the timer does not fire until the next time the run loop checks the timer. Therefore, the actual time at which the timer fires potentially can be a significant period of time after the scheduled firing time.
不过,这适用于 NSTimer,您通常使用它来触发应在特定时间或时间间隔发生的事件。如果您尝试测量耗时,您可能会得到比 100 毫秒更准确的结果,但我在文档中没有看到记录的准确性。
关于iphone - iPhone 4S 定时器的粒度是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8766395/