how to get a accurate timer in ios
I am doing an app which needs a timer. I have tried NSTimer but NSTimer always loses or gets delayed. Is there a class in the iOS SDK which can log time accurately. An accuracy between 20ms and 40ms is okay. I'd like to be able to change an image in a fixed time interval. NSTimer *timer1 = [NSTimer scheduledTimerWithTimeInterval:.04f target:self selector:@selector(timer1) userInfo:nil repeats:YES]; - (void)timer1 { NSLog(@"timer1 timer %@",[NSDate date]); } NSTimer is not a high-resolution timer. From the NSTimer class documentation: Because of the various input sources a typical run loop