NSDate* tmpStartData = [NSDate date]; //You code here... double deltaTime = [[NSDate date] timeIntervalSinceDate:tmpStartData]; NSLog(@"cost time = %f", deltaTime);