From 4fafee2e9387703c2f4b92e8ecf1ced5e4b711cf Mon Sep 17 00:00:00 2001 From: MoneroOcean Date: Thu, 11 Oct 2018 13:48:17 +0200 Subject: [PATCH] Added timer start/stop during algo switch --- src/workers/Workers.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/workers/Workers.cpp b/src/workers/Workers.cpp index f781f5f9..053c1477 100644 --- a/src/workers/Workers.cpp +++ b/src/workers/Workers.cpp @@ -210,6 +210,8 @@ void Workers::start(xmrig::Controller *controller) void Workers::soft_stop() // stop current workers leaving uv stuff intact (used in switch_algo) { + uv_timer_stop(&m_timer); + if (m_hashrate) { m_hashrate->stop(); delete m_hashrate; @@ -271,6 +273,8 @@ void Workers::switch_algo(const xmrig::Algorithm& algorithm) m_workers.push_back(handle); handle->start(Workers::onReady); } + + uv_timer_start(&m_timer, Workers::onTick, 500, 500); }