https://bugs.kde.org/show_bug.cgi?id=392768

--- Comment #9 from Julien Goodwin <jgood...@studio442.com.au> ---
Created attachment 124842
  --> https://bugs.kde.org/attachment.cgi?id=124842&action=edit
Invert wait duration subtraction

Will need to let it soak to be sure, but it looks like this is at least one
major part of the fix, I even called out it in comment 7, but missed the error:

ms = qMax<int>(d->nextTimeout.elapsed() - d->nextTimeoutMsecs, 1);

Will mean the sleep is for as long as the timer has run *minus* the intended
duration, so if nextTimeoutMsecs is ever set, this becomes very negative, and
1ms is the result.

Inverting the subtraction:
ms = qMax<int>(d->nextTimeoutMsecs - d->nextTimeout.elapsed(), 1);

Means sleeping for the remaining time, and so far my CPU seems much happier,
with my KIO-HTTP using apps looking fine.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to