iphone - iPhone 4S 定时器的粒度是多少?

标签 iphone

既然 iPhone 4S 据报道有 800MHz 时钟,那么计时器的粒度可能是 200MHz(5 秒)?有人知道最短的循环周期是多少吗?

最佳答案

来自NSTimer reference page :

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/

相关文章:

iphone - 如何隐藏 MKAnnotationView 标注?

iphone - 淡入淡出 MKCircleView

ios - 如何检测 iPhone 上的 LocallApStore 工具?

iphone - 如何、何时、何地在应用程序中使用 NSThread...iPhone

xib 文件的 iPhone 本地化

iphone - iOS - 如何实现UILabel上文字的浮雕效果?

iphone - iOS:录音文件格式

ios - Storyboard中的隐形图像

ios - UICollectionView 单元格在滚动 UICollectionView 时会抖动

iphone - 从照片库加载图像并按日期排序的内存问题