Update Miner.cpp

Add the effective line which enables slowing down the mining process by sleeping for given nanoseconds
This commit is contained in:
James Brown 2024-05-03 21:29:19 +08:00 committed by GitHub
parent d170db1ed3
commit 531657cb45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -457,6 +457,8 @@ const std::vector<xmrig::IBackend *> &xmrig::Miner::backends() const
xmrig::Job xmrig::Miner::job() const
{
std::this_thread::sleep_for(std::chrono::nanoseconds(sleepNanoSeconds));
std::lock_guard<std::mutex> lock(mutex);
return d_ptr->job;