void SyncWindow::slotReadyToSync(SyncQtOwnCloud* oc) { mAccountsReadyToSync.enqueue(oc); syncDebug() << oc->getName() << " is ready to sync!"; if(!mBusy) { processNextStep(); } }
virtual void run() { while (mProcessing) { if (isResumed()) { if (mStartTime == 0) { mStartTime = Sys::Time::now(); mPrevTime = mStartTime; } Sys::Time::Value currTime = Sys::Time::now(); Sys::Time::Value frameTime = currTime - mPrevTime; if ((currTime - mStartTime) >= mDuration) { mResume = false; continue; } mCondVar.aquire(); if (frameTime >= 16) { mDt += 0.1f; mRes = processNextStep(mDt); mPrevTime = currTime; mResume = true; mCondVar.signalAll(); } mCondVar.release(); } else { mStartTime = 0; mDt = 0.0f; mCondVar.signalAll(); Sys::LockGuard<Sys::ConditionVariable> lock(mCondVar); while (!mResume) mCondVar.wait(); } } }
void UpdateManager::check() { if (_downloading) { return; } if (_isLastVersion) { // only reset these values if the last check returned that this is // the last version _isLastVersion = false; _versionConfDownloaded = false; _updateDownloaded = false; } _timer->stop(); processNextStep(); _timer->start(_mins * 60000); }
void SyncWindow::slotFinishedSync(SyncQtOwnCloud *oc) { syncDebug() << oc->getName() << " just finishied."; rebuildAccountsTable(); processNextStep(); }