From 6d7c0866859a0fe27a8055068552470b67d680e3 Mon Sep 17 00:00:00 2001 From: AL <26797547+Al12rs@users.noreply.github.com> Date: Sun, 7 Jun 2020 21:06:33 +0200 Subject: Change time measurement to not include lock wait time. --- src/mainwindow.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 1a868eec..c3a19bf4 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1106,8 +1106,6 @@ QFuture MainWindow::checkForProblemsAsync() { void MainWindow::checkForProblemsImpl() { - TimeThis tt("MainWindow::checkForProblemsImpl()"); - m_ProblemsCheckRequired = true; std::scoped_lock lk(m_CheckForProblemsMutex); @@ -1115,6 +1113,7 @@ void MainWindow::checkForProblemsImpl() // another thread might already have checked while this one was waiting on the lock if (m_ProblemsCheckRequired) { m_ProblemsCheckRequired = false; + TimeThis tt("MainWindow::checkForProblemsImpl()"); size_t numProblems = 0; for (QObject *pluginObj : m_PluginContainer.plugins()) { IPlugin *plugin = qobject_cast(pluginObj); -- cgit v1.3.1