NSTimer timestamp timeinterval question

Posted by okami on Stack Overflow See other posts from Stack Overflow or by okami
Published on 2010-05-29T14:35:11Z Indexed on 2010/05/29 14:42 UTC
Read the original article Hit count: 443

Filed under:
|

I have the following code:

[NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(timerCount:) userInfo:nil repeats:YES];

-(void)timerCount:(NSTimer *)timer
{
    NSTimeInterval dt = [timer timeInterval];
    // do something
}

The NSTimeInterval I got will be 0.5, the time interval I've put on scheduledTimerWithInterval, this means the timerCount will be called each 0.5 seconds.

But I now that there are some stuff as timeStamps, and I want to know if the NSTimer will call the timerCount method in PRECISELY 0.5 seconds each time.

© Stack Overflow or respective owner

Related posts about nstimer

Related posts about nstimeinterval