时间间隔

计算当前时间与上次执行时间的时间间隔。

       
NSTimeInterval timetravel = [[NSDate date]timeIntervalSinceDate:self.lastPlaySoundDate]; if (timetravel<3.0) { DLog(@"时间太短,。。"); }
self.lastPlaySoundDate
= [NSDate date];

猜你喜欢

转载自www.cnblogs.com/OIMM/p/9173685.html