Alex Rivera | Logout

How to access system time finer than 1 second on the iPhone

Asked 2009-07-04T11:24:12.510
9

The system time function time(0) gives me a resolution of 1 second, right?

Is there a finer-grained function?

I'm using it to determine the time interval between two events.

A line of code would help me greatly. It makes it easier to have something concrete to hang the concept on when I look in the official documentation.

Edit
Report

1 Answer

1

Did you look for gettimeofday()? That's the main POSIX function for sub-second resolution timing analogous to time().

See Native App Development for the iPhone for an illustration of its use.

answered 2009-07-04T11:37:33.293

Your Answer