|
@@ -306,7 +306,10 @@
|
|
|
NSTimeInterval timers = curCouldPhoneFileModel.curTimeInterval - curCouldPhoneFileModel.preTimeInterval;
|
|
NSTimeInterval timers = curCouldPhoneFileModel.curTimeInterval - curCouldPhoneFileModel.preTimeInterval;
|
|
|
|
|
|
|
|
if(timers > 0){
|
|
if(timers > 0){
|
|
|
- long speed= 1*1024*1024 / timers;
|
|
|
|
|
|
|
+ //long speed= 1*1024*1024 / timers;
|
|
|
|
|
+
|
|
|
|
|
+ long speed= (curCouldPhoneFileModel.didDownloadBytes - curCouldPhoneFileModel.preDownloadBytes) / timers;
|
|
|
|
|
+
|
|
|
NSString * speedStr = nil;
|
|
NSString * speedStr = nil;
|
|
|
NSInteger speed_k = speed / (1024);
|
|
NSInteger speed_k = speed / (1024);
|
|
|
if(speed_k < 1024){
|
|
if(speed_k < 1024){
|
|
@@ -321,6 +324,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
curCouldPhoneFileModel.preTimeInterval = curCouldPhoneFileModel.curTimeInterval;
|
|
curCouldPhoneFileModel.preTimeInterval = curCouldPhoneFileModel.curTimeInterval;
|
|
|
|
|
+ curCouldPhoneFileModel.preDownloadBytes = curCouldPhoneFileModel.didDownloadBytes;
|
|
|
}
|
|
}
|
|
|
else if(curCouldPhoneFileModel.curDownloadStateType == downloadStateSuspend){
|
|
else if(curCouldPhoneFileModel.curDownloadStateType == downloadStateSuspend){
|
|
|
[_upLoadStateButton setImage:[UIImage imageNamed:@"uploadFile_start"] forState:UIControlStateNormal];
|
|
[_upLoadStateButton setImage:[UIImage imageNamed:@"uploadFile_start"] forState:UIControlStateNormal];
|