您好,我试图在 Objective C 中找到一个解决方案,以使音频文件的长度包括毫秒。目前我只有这个代码:
-(NSString *) DoubleToNSStringTime:(double)valore
{
NSNumber *theDouble = [NSNumber numberWithDouble:valore];
int inputSeconds = [theDouble intValue];
int hours = inputSeconds / 3600;
int minutes = (inputSeconds - hours * 3600 ) / 60;
int seconds = inputSeconds - hours * 3600 - minutes * 60;
NSString *theTime = [NSString stringWithFormat:@"%.2d:%.2d", minutes, seconds];
NSLog(@"TDoubleToNSStringTime= %@", theTime);
return theTime;
}
问题是这样的:我想获得更精确的时间位置,分钟:秒:毫秒
你们中的一些人有解决方案吗?
谢谢