mirror of https://github.com/aria2/aria2
Call calculateStatistics() after global::wallclock.reset().
Inside calculateStatistics(), global::wallclock is used and if calculateStatistics() is called after waitData(), it may use quite old global::wallclock value.pull/1/head
parent
3574f6bd7d
commit
af4e47329b
|
@ -141,6 +141,7 @@ void DownloadEngine::run()
|
|||
cp.reset(0);
|
||||
while(!commands_.empty() || !routineCommands_.empty()) {
|
||||
global::wallclock.reset();
|
||||
calculateStatistics();
|
||||
if(cp.differenceInMillis(global::wallclock) >= refreshInterval_) {
|
||||
refreshInterval_ = DEFAULT_REFRESH_INTERVAL;
|
||||
cp = global::wallclock;
|
||||
|
@ -154,7 +155,6 @@ void DownloadEngine::run()
|
|||
waitData();
|
||||
}
|
||||
noWait_ = false;
|
||||
calculateStatistics();
|
||||
}
|
||||
onEndOfRun();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue