diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-02-21 11:21:14 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-02-21 11:21:14 +0200 |
commit | 6994c85201e6a8423fad2848341449ebfd86a61d (patch) | |
tree | a455041b716b05623d9b06527c9314fad95ef91b | |
parent | Merge pull request #1744 (diff) | |
parent | BACKGROUND_MINING_MINER_MONITOR_INVERVAL_IN_SECONDS was odr-used, so required... (diff) | |
download | monero-6994c85201e6a8423fad2848341449ebfd86a61d.tar.xz |
Merge pull request #1733
a493c0b1 BACKGROUND_MINING_MINER_MONITOR_INVERVAL_IN_SECONDS was odr-used, so required a definition. (Dion Ahmetaj)
-rw-r--r-- | src/cryptonote_basic/miner.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp index bf1b057ee..70389f917 100644 --- a/src/cryptonote_basic/miner.cpp +++ b/src/cryptonote_basic/miner.cpp @@ -580,10 +580,9 @@ namespace cryptonote // If we're already mining, then sleep for the miner monitor interval. // If we're NOT mining, then sleep for the idle monitor interval - boost::this_thread::sleep_for( - m_is_background_mining_started ? - boost::chrono::seconds( BACKGROUND_MINING_MINER_MONITOR_INVERVAL_IN_SECONDS ) : - boost::chrono::seconds( get_min_idle_seconds() ) ); + uint64_t sleep_for_seconds = BACKGROUND_MINING_MINER_MONITOR_INVERVAL_IN_SECONDS; + if( !m_is_background_mining_started ) sleep_for_seconds = get_min_idle_seconds(); + boost::this_thread::sleep_for(boost::chrono::seconds(sleep_for_seconds)); } catch(const boost::thread_interrupted&) { |