Added timer start/stop during algo switch
This commit is contained in:
parent
af96ca4f46
commit
4fafee2e93
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
void Workers::soft_stop() // stop current workers leaving uv stuff intact (used in switch_algo)
|
||||||
{
|
{
|
||||||
|
uv_timer_stop(&m_timer);
|
||||||
|
|
||||||
if (m_hashrate) {
|
if (m_hashrate) {
|
||||||
m_hashrate->stop();
|
m_hashrate->stop();
|
||||||
delete m_hashrate;
|
delete m_hashrate;
|
||||||
|
@ -271,6 +273,8 @@ void Workers::switch_algo(const xmrig::Algorithm& algorithm)
|
||||||
m_workers.push_back(handle);
|
m_workers.push_back(handle);
|
||||||
handle->start(Workers::onReady);
|
handle->start(Workers::onReady);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uv_timer_start(&m_timer, Workers::onTick, 500, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue