mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-24 21:32:47 -05:00
Added timer start/stop during algo switch
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user