Commit Graph

4 Commits

Author SHA1 Message Date
Dion Ahmetaj
2937fdbbbf Moved setting of previous process times to block where background mining is started, and added an explicit sleep in that block to wait for some mining to occur. 2017-02-10 18:07:40 -05:00
Dion Ahmetaj
21a1e0252f Set background mining started bool to false on bg thread start. If mining::stop then mining::start, idle logic is re-run instead of starting immediately (if it was running before stop). 2017-02-10 18:07:39 -05:00
Dion Ahmetaj
345ed4823c Background/smart mining. If a users' computer is plugged into a power
source, and CPU has been idle for some time, then begin mining to some
threshold (don't destroy the users' CPU).

This patch only supports windows and linux (I've only tested on Win64 and
Ubuntu).

The variables currently default to pretty conservative values (i.e. 20%
CPU mining threshold).
2017-02-10 18:07:39 -05:00
kenshi84
8027ce0c75 extract some basic code from libcryptonote_core into libcryptonote_basic 2017-02-08 22:45:15 +09:00