关于iOS中的时间
                
                
                
                    
                        - 摘要:两类绝对时间[NSDatedate]、CFAbsoluteTimeGetCurrent(),或者gettimeofday()。返回的是从某一个时刻开始,度过的秒数。会随着用户设置的系统时间更改。相对时间CACurrentMediaTime或者-[NSProcessInfosystemUptime],相对时间。重启之后,会重新计数。参考资料KeepingTrackofTimePassedoniOSNSDate、CFAbsoluteTimeGetCurrent
- 标签:iOS 
 
                
                    
                    两类
- 绝对时间
 [NSDate date]、CFAbsoluteTimeGetCurrent(),或者gettimeofday()。 
返回的是从某一个时刻开始,度过的秒数。会随着用户设置的系统时间更改。
 
- 相对时间
 CACurrentMediaTime或者-[NSProcessInfo systemUptime],相对时间。重启之后,会重新计数。
参考资料
- Keeping Track of Time Passed on iOS
- NSDate 、CFAbsoluteTimeGetCurrent、CACurrentMediaTime 的区别
- Benchmarking