To have auxiliary updates, the timer interval must be <1. But the accuracy of NSTimer is about 50 ms, so scheduledTimerWithTimeInterval:0.01it will not work.
, , timeSeconds . - NSDate . , , esp. .
, , countdownTimer .
countdownTimer = [NSTimer scheduledTimerWithTimeInterval:0.67 target:self selector:@selector(updateTimerLabel) userInfo:nil repeats:YES];
, , centiseconds:
if(appDelegate.gameStateRunning == YES){
if(gameVarLevel==1){
timeCentiseconds = 10000;
AllowResetTimer = NO;
}
}
timeCentiseconds -= 67;
, 100 :
timerLabel.text=[NSString stringWithFormat:@"Time: %d.%02d", timeCentiseconds/100, timeCentiseconds%100];
double:
double timeSeconds;
...
if(appDelegate.gameStateRunning == YES){
if(gameVarLevel==1){
timeSeconds = 100;
AllowResetTimer = NO;
}
}
timeSeconds -= 0.67;
timerLabel.text=[NSString stringWithFormat:@"Time: %.2g", timeSeconds];