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]);
}