Skip to main content
GameDev.net gamedev.net
🔒 Locked

iPhone Timer

Started by anupgupta Oct 5, 2010 at 12:27 AM 0 replies 700+ views
Original Post
anupgupta
anupgupta
Does anyone have an idea, what can i use to get time in milliseconds/seconds in iphone?
DonaldHays
DonaldHays
[NSDate timeIntervalSince1970] returns a double (typedef-ed as NSTimeInterval) with the number of seconds since January 1 1970, with subsecond precision. The number of milliseconds would be [NSDate timeIntervalSince1970] * 1000. I'm not sure the precision of the method, but it's been plenty sufficient for me for timing purposes.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.