修改cts 变成整形 review by 朱小军
Showing
1 changed file
with
4 additions
and
4 deletions
@@ -209,20 +209,20 @@ | @@ -209,20 +209,20 @@ | ||
209 | [self.baiduManager POST:kbaiduApiMethod parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) { | 209 | [self.baiduManager POST:kbaiduApiMethod parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) { |
210 | NSDate *endDate = [NSDate date]; | 210 | NSDate *endDate = [NSDate date]; |
211 | if (block) { | 211 | if (block) { |
212 | - NSTimeInterval cts = [endDate timeIntervalSinceDate:startDate] * 1000.0; | ||
213 | - block(cts,operation.response.statusCode); | 212 | + long durationTime = [endDate timeIntervalSinceDate:startDate] * 1000; |
213 | + block(durationTime,operation.response.statusCode); | ||
214 | } | 214 | } |
215 | } failure:^(AFHTTPRequestOperation *operation, NSError *error) { | 215 | } failure:^(AFHTTPRequestOperation *operation, NSError *error) { |
216 | NSDate *endDate = [NSDate date]; | 216 | NSDate *endDate = [NSDate date]; |
217 | if (block) { | 217 | if (block) { |
218 | - NSTimeInterval cts = [endDate timeIntervalSinceDate:startDate] * 1000.0; | 218 | + long durationTime = [endDate timeIntervalSinceDate:startDate] * 1000; |
219 | NSInteger ect = 0; | 219 | NSInteger ect = 0; |
220 | if (error.code == 0) { | 220 | if (error.code == 0) { |
221 | ect = -1; | 221 | ect = -1; |
222 | } else { | 222 | } else { |
223 | ect = error.code; | 223 | ect = error.code; |
224 | } | 224 | } |
225 | - block(cts,ect); | 225 | + block(durationTime,ect); |
226 | } | 226 | } |
227 | }]; | 227 | }]; |
228 | } | 228 | } |
-
Please register or login to post a comment