标签:ios
- (void)viewDidLoad { [super viewDidLoad]; NSLog(@"%d",countOfCores()); } unsigned int countOfCores() { unsigned int ncpu; size_t len = sizeof(ncpu); sysctlbyname("hw.ncpu",&ncpu,&len,NULL,0); return ncpu; }
标签:ios
原文地址:http://blog.csdn.net/rainlesvio/article/details/40863493