Schedule timer with NSTimer makes the task run faster than expected

Posted by Hoang Pham on Stack Overflow See other posts from Stack Overflow or by Hoang Pham
Published on 2010-03-15T11:06:22Z Indexed on 2010/03/15 11:09 UTC
Read the original article Hit count: 503

Filed under:
|
|
|

I schedule a timer with NSTimer's function in viewWillAppear as follows:

minutesTimer = nil;
minutesTimer = [NSTimer scheduledTimerWithTimeInterval:60 target:self selector:@selector(updateScrollViewItems) userInfo:NULL repeats:YES];

With this function call, I expect it to call the selector updateScrollViewItems every minute, but it does not, it update items faster than expected (around some seconds).

What is the cause of this unexpected behavior?

© Stack Overflow or respective owner

Related posts about nstimer

Related posts about iphone