void Dummy::doBenchmark() { KConfigGroup settings(KSharedConfig::openConfig(), "bench"); results.clear(); const QString startDir = settings.readPathEntry("path", QString()); QString directory = QFileDialog::getExistingDirectory(m_part->view(), QString::fromLatin1("Please select directory with tests"), startDir); if (!directory.isEmpty()) { settings.writePathEntry("path", directory); KSharedConfig::openConfig()->sync(); QDir dirListing(directory, "*.html"); for (unsigned i = 0; i < dirListing.count(); ++i) { filesToBenchmark.append(dirListing.absoluteFilePath(dirListing[i])); } } benchmarkRun = 0; if (!filesToBenchmark.isEmpty()) { nextRun(); } }
void Dummy::handleDone() { if (filesToBenchmark.isEmpty()) return; results[filesToBenchmark[0]].append(loadTimer.elapsed()); ++benchmarkRun; QTimer::singleShot(100, this, SLOT(nextRun())); }
bool CalendarTiming::reset() { m_lastExecution = Client::instance()->ntpController()->currentDateTime(); return nextRun().isValid(); }