2011-11-28 16 views

回答

8

您可以简单地使用NSDate的:

NSDate *start=[NSDate date]; 
NSLog(@"Start time %@", start); 

[request startSynchronous]; 

,并在成功/失败的选择,请致电:

NSDate *end=[NSDate date]; 
NSLog(@"End time %@", end); 

double ellapsedSeconds= [end timeIntervalSinceDate:start]; 
1

使用本

startDate = [NSDate date]; 

这里你调用WebService的

NSTimeInterval startTime = [startDate timeIntervalSinceNow]; 

这会给你的时间间隔。

相关问题