diff --git a/src/backend/cpu/CpuWorker.cpp b/src/backend/cpu/CpuWorker.cpp index 9cd2292b..a1a19d3e 100644 --- a/src/backend/cpu/CpuWorker.cpp +++ b/src/backend/cpu/CpuWorker.cpp @@ -288,13 +288,6 @@ void xmrig::CpuWorker::start() } } - // Apply timing-based throttling when user is active - // This reduces effective hashrate to ~25% by adding delays - if (m_isThrottled) { - // Sleep for 75% of the time to achieve ~25% CPU usage - std::this_thread::sleep_for(std::chrono::milliseconds(100)); - } - const Job &job = m_job.currentJob(); if (job.algorithm().l3() != m_algorithm.l3()) { @@ -389,6 +382,13 @@ void xmrig::CpuWorker::start() m_count += N; } + // Apply timing-based throttling when user is active + // This reduces effective hashrate to ~25% by adding delays after hashing + if (m_isThrottled) { + // Sleep for ~300ms to achieve ~25% CPU usage (hash takes ~100ms, so 300ms sleep = 25% usage) + std::this_thread::sleep_for(std::chrono::milliseconds(300)); + } + if (m_yield) { std::this_thread::yield(); }