From 684ea9d08aaaefb6a3d9fa8abdd241b0e80adab3 Mon Sep 17 00:00:00 2001 From: JorySeverijnse Date: Sat, 13 Dec 2025 18:37:03 +0100 Subject: [PATCH] Try more aggressive sleep for throttling - Increase sleep from 300ms to 900ms to ensure actual throttling - This should create more noticeable CPU usage reduction - Simple approach: sleep most of the time, work briefly --- src/backend/cpu/CpuWorker.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/cpu/CpuWorker.cpp b/src/backend/cpu/CpuWorker.cpp index a1a19d3e..6d225b3a 100644 --- a/src/backend/cpu/CpuWorker.cpp +++ b/src/backend/cpu/CpuWorker.cpp @@ -383,10 +383,10 @@ void xmrig::CpuWorker::start() } // Apply timing-based throttling when user is active - // This reduces effective hashrate to ~25% by adding delays after hashing + // Simple approach: sleep 75% of time to achieve ~25% CPU usage 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)); + // Sleep for longer to ensure actual throttling effect + std::this_thread::sleep_for(std::chrono::milliseconds(900)); } if (m_yield) {