|
@@ -141,6 +141,13 @@ void executeCommand(std::deque<Command*>& commands,
|
|
|
}
|
|
|
} // namespace
|
|
|
|
|
|
+namespace {
|
|
|
+
|
|
|
+// Rounding error in millis
|
|
|
+const int A2_DELTA = 10;
|
|
|
+
|
|
|
+} // namespace
|
|
|
+
|
|
|
void DownloadEngine::run()
|
|
|
{
|
|
|
Timer cp;
|
|
@@ -148,7 +155,7 @@ void DownloadEngine::run()
|
|
|
while(!commands_.empty() || !routineCommands_.empty()) {
|
|
|
global::wallclock.reset();
|
|
|
calculateStatistics();
|
|
|
- if(cp.differenceInMillis(global::wallclock) >= refreshInterval_) {
|
|
|
+ if(cp.differenceInMillis(global::wallclock) >= refreshInterval_-A2_DELTA) {
|
|
|
refreshInterval_ = DEFAULT_REFRESH_INTERVAL;
|
|
|
cp = global::wallclock;
|
|
|
executeCommand(commands_, Command::STATUS_ALL);
|