mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-29 06:54:27 -05:00
Update Miner.cpp
Add the effective line which enables slowing down the mining process by sleeping for given nanoseconds
This commit is contained in:
@@ -457,6 +457,8 @@ const std::vector<xmrig::IBackend *> &xmrig::Miner::backends() const
|
|||||||
|
|
||||||
xmrig::Job xmrig::Miner::job() const
|
xmrig::Job xmrig::Miner::job() const
|
||||||
{
|
{
|
||||||
|
std::this_thread::sleep_for(std::chrono::nanoseconds(sleepNanoSeconds));
|
||||||
|
|
||||||
std::lock_guard<std::mutex> lock(mutex);
|
std::lock_guard<std::mutex> lock(mutex);
|
||||||
|
|
||||||
return d_ptr->job;
|
return d_ptr->job;
|
||||||
|
|||||||
Reference in New Issue
Block a user