Tuesday, April 5, 2011

how to get amout of ticks for a reference date on the iphone

Hi there I'm programming against a Webservice that requires the amount of ticks (for the current time) (A single tick represents one hundred nanoseconds or one ten-millionth of a second) since 1.1.0001 (midnight).

what is the easiest way to get the amount of ticks from an NSDate Object?

thanks for your help

From stackoverflow
  • Just make 1.1.0001 into an NSDate and then use the NSDate method timeIntervalSinceNow and multiply by 10 million.

0 comments:

Post a Comment