Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/108.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何获取插入sqlite所用的时间(毫秒)_Ios_Objective C - Fatal编程技术网

Ios 如何获取插入sqlite所用的时间(毫秒)

Ios 如何获取插入sqlite所用的时间(毫秒),ios,objective-c,Ios,Objective C,这是我的代码: NSLog(@"Insert time before = %f",[[NSDate date] timeIntervalSince1970]); [self insertDataInSqlite]; NSLog(@"Insert time after = %f",[[NSDate date] timeIntervalSince1970]); 但是我想打印这个插入方法所花费的时间 NSLog(@"start time:%@", NSDate.date); [self inser

这是我的代码:

NSLog(@"Insert time before = %f",[[NSDate date] timeIntervalSince1970]);
[self insertDataInSqlite]; 
NSLog(@"Insert time after = %f",[[NSDate date] timeIntervalSince1970]);
但是我想打印这个插入方法所花费的时间

NSLog(@"start time:%@", NSDate.date);
[self insertDataInSqlite];
NSLog(@"end time:%@", NSDate.date);
这是查看插入时间的最简单方法