How Do I write a Timer in Objective-C?
Don’t use NSTimer that way. NSTimer is normally used to fire a selector at some time interval. It isn’t high precision and isn’t suited to what you want to do. What you want is a High resolution timer class (using NSDate): Output: Total time was: 0.002027 milliseconds Total time was: 0.000002 seconds Total time was: … Read more