Process: Change signature of setReaperTimeout()

Change the arg to std::chrono::milliseconds type.

Change-Id: I7b79fc318e2fd06971148038a31fecd4c1805a79
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2024-01-22 20:29:40 +01:00
parent e98f6e31e7
commit 665beaead9
9 changed files with 22 additions and 17 deletions

View File

@@ -42,18 +42,20 @@ static Q_LOGGING_CATEGORY(androidRunWorkerLog, "qtc.android.run.androidrunnerwor
static const int GdbTempFileMaxCounter = 20;
}
using namespace std;
using namespace std::placeholders;
using namespace ProjectExplorer;
using namespace Utils;
using namespace std;
using namespace std::chrono_literals;
using namespace std::placeholders;
namespace Android {
namespace Internal {
static const QString pidPollingScript = QStringLiteral("while [ -d /proc/%1 ]; do sleep 1; done");
static const QRegularExpression userIdPattern("u(\\d+)_a");
static const int s_jdbTimeout = 5000;
static const std::chrono::milliseconds s_jdbTimeout = 5s;
static int APP_START_TIMEOUT = 45000;
static bool isTimedOut(const chrono::high_resolution_clock::time_point &start,
@@ -785,7 +787,7 @@ void AndroidRunnerWorker::handleJdbSettled()
m_jdbProcess->write(QString("%1\n").arg(command));
}
if (!m_jdbProcess->waitForFinished(s_jdbTimeout)) {
if (!m_jdbProcess->waitForFinished(s_jdbTimeout.count())) {
m_jdbProcess.reset();
} else if (m_jdbProcess->exitStatus() == QProcess::NormalExit && m_jdbProcess->exitCode() == 0) {
qCDebug(androidRunWorkerLog) << "JDB settled";