iPhone:如何获得当前的毫秒数? [英] iPhone: How to get current milliseconds?
本文介绍了iPhone:如何获得当前的毫秒数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
获取当前系统时间毫秒的最佳方法是什么?
What is the best way to get the current system time milliseconds?
推荐答案
[[NSDate date] timeIntervalSince1970];
它以双精度形式返回自纪元以来的秒数.我几乎可以肯定您可以从小数部分访问毫秒.
It returns the number of seconds since epoch as a double. I'm almost sure you can access the milliseconds from the fractional part.
这篇关于iPhone:如何获得当前的毫秒数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文