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).

This commit is contained in:
Dion Ahmetaj 2017-02-02 12:24:42 -05:00 committed by Dion Ahmetaj
parent 345ed4823c
commit 21a1e0252f

View File

@ -526,6 +526,7 @@ namespace cryptonote
uint64_t prev_total_time, current_total_time; uint64_t prev_total_time, current_total_time;
uint64_t prev_idle_time, current_idle_time; uint64_t prev_idle_time, current_idle_time;
uint64_t previous_process_time = 0, current_process_time = 0; uint64_t previous_process_time = 0, current_process_time = 0;
m_is_background_mining_enabled = false;
if(!get_system_times(prev_total_time, prev_idle_time)) if(!get_system_times(prev_total_time, prev_idle_time))
{ {