@@ -336,7 +336,10 @@ void Miner::startThreads() {
336336 for (uint16_t i (0 ) ; i < _parameters.threads ; i++)
337337 _workerThreads.push_back (std::thread (&Miner::_doTasks, this , i));
338338 std::cout << " -----------------------------------------------------------" << std::endl;
339- std::cout << Stats::formattedTime (_statManager.timeSinceStart ()) << " Started mining at block " << _client->currentHeight () << " , difficulty " << FIXED (3 ) << _client->currentDifficulty () << std::endl;
339+ if (_mode == " Benchmark" || _mode == " Search" )
340+ std::cout << Stats::formattedTime (_statManager.timeSinceStart ()) << " Started " << _mode << " , difficulty " << FIXED (3 ) << _client->currentDifficulty () << std::endl;
341+ else
342+ std::cout << Stats::formattedClockTimeNow () << " Started mining at block " << _client->currentHeight () << " , difficulty " << FIXED (3 ) << _client->currentDifficulty () << std::endl;
340343 }
341344}
342345
@@ -787,7 +790,10 @@ void Miner::_doCheckTask(Task task) {
787790 // If tuple long enough or share, submit
788791 if (primeCount >= _works[workIndex].job .primeCountMin || (_mode == " Search" && primeCount >= _parameters.tupleLengthMin )) {
789792 const mpz_class basePrime (candidate - offsetSum);
790- std::cout << Stats::formattedTime (_statManager.timeSinceStart ()) << " " << primeCount;
793+ if (_mode == " Benchmark" || _mode == " Search" )
794+ std::cout << Stats::formattedTime (_statManager.timeSinceStart ()) << " " << primeCount;
795+ else
796+ std::cout << Stats::formattedClockTimeNow () << " " << primeCount;
791797 if (_mode == " Pool" )
792798 std::cout << " -share found by worker thread " << threadId << std::endl;
793799 else {
@@ -867,7 +873,11 @@ void Miner::_manageTasks() {
867873 // Notify when the network found a block
868874 if (isNewHeight && oldHeight != 0 ) {
869875 _statManager.newBlock ();
870- std::cout << Stats::formattedTime (_statManager.timeSinceStart ()) << " Block " << job.height << " , average " << FIXED (1 ) << _statManager.averageBlockTime () << " s, difficulty " << FIXED (3 ) << job.difficulty << std::endl;
876+ if (_mode == " Benchmark" || _mode == " Search" )
877+ std::cout << Stats::formattedTime (_statManager.timeSinceStart ());
878+ else
879+ std::cout << Stats::formattedClockTimeNow ();
880+ std::cout << " Block " << job.height << " , average " << FIXED (1 ) << _statManager.averageBlockTime () << " s, difficulty " << FIXED (3 ) << job.difficulty << std::endl;
871881 }
872882 _works[_currentWorkIndex].primorialMultipleStart = _works[_currentWorkIndex].job .target + _primorial - (_works[_currentWorkIndex].job .target % _primorial);
873883 // Reset Counts and create Presieve Tasks
@@ -997,9 +1007,13 @@ bool Miner::hasAcceptedPatterns(const std::vector<std::vector<uint64_t>> &accept
9971007
9981008void Miner::printStats () const {
9991009 Stats statsRecent (_statManager.stats (false )), statsSinceStart (_statManager.stats (true ));
1000- if (_mode == " Benchmark" || _mode == " Search" )
1010+ if (_mode == " Benchmark" || _mode == " Search" ) {
10011011 statsRecent = statsSinceStart;
1002- std::cout << Stats::formattedTime (_statManager.timeSinceStart ()) << " " << FIXED (2 ) << statsRecent.cps () << " c/s, r " << statsRecent.r ();
1012+ std::cout << Stats::formattedTime (_statManager.timeSinceStart ());
1013+ }
1014+ else
1015+ std::cout << Stats::formattedClockTimeNow ();
1016+ std::cout << " " << FIXED (2 ) << statsRecent.cps () << " c/s, r " << statsRecent.r ();
10031017 if (_mode != " Pool" ) {
10041018 std::cout << " ; (1-" << _parameters.pattern .size () << " t) = " << statsSinceStart.formattedCounts (1 );
10051019 if (statsRecent.count (1 ) >= 10 )
0 commit comments