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
This commit is contained in:
JorySeverijnse 2025-12-13 18:37:03 +01:00
parent 2972172a05
commit 684ea9d08a

View File

@ -383,10 +383,10 @@ void xmrig::CpuWorker<N>::start()
} }
// Apply timing-based throttling when user is active // 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) { if (m_isThrottled) {
// Sleep for ~300ms to achieve ~25% CPU usage (hash takes ~100ms, so 300ms sleep = 25% usage) // Sleep for longer to ensure actual throttling effect
std::this_thread::sleep_for(std::chrono::milliseconds(300)); std::this_thread::sleep_for(std::chrono::milliseconds(900));
} }
if (m_yield) { if (m_yield) {