uint64_t begin = mach_absolute_time();
uint64_t end = mach_absolute_time();
NSLog(@"本次用時-------------%g s",MachTimeToSecs(end - begin));
// 用于統(tǒng)計時間
double MachTimeToSecs(uint64_t time)
{
mach_timebase_info_data_t timebase;
mach_timebase_info(&timebase);
return (double)time * (double)timebase.numer / (double)timebase.denom / 1e9;
}