谁能告诉我如何在这段代码中显示毫秒?
-(void)updateViewForPlayerInfo:(AVAudioPlayer*)p {
countdownTimer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(updateTimeLeft)userInfo:p repeats:YES];
}
- (void)updateTimeLeft {
NSTimeInterval timeLeft = player.duration - player.currentTime;
int min=timeLeft / 60;
int sec=lroundf(timeLeft) % 60;
durationLabel.text = [NSString stringWithFormat:@"-%02d:%02d",min,sec,nil];
}