simplewallet: lessen display flicker confusion
Height seemed to be flying all over the place on a rescan here. Logging to a file shows the heights are actually correct, and this is some kind of screen refresh artifact. Flush after \r and update less often to reduce this effect a lot.
This commit is contained in:
parent
0d09e15a1c
commit
00790a8921
|
@ -175,9 +175,9 @@ namespace cryptonote
|
|||
m_blockchain_height = (std::max)(m_blockchain_height, height);
|
||||
}
|
||||
|
||||
if (std::chrono::milliseconds(1) < current_time - m_print_time || force)
|
||||
if (std::chrono::milliseconds(20) < current_time - m_print_time || force)
|
||||
{
|
||||
std::cout << QT_TRANSLATE_NOOP("cryptonote::simple_wallet", "Height ") << height << " / " << m_blockchain_height << '\r';
|
||||
std::cout << QT_TRANSLATE_NOOP("cryptonote::simple_wallet", "Height ") << height << " / " << m_blockchain_height << '\r' << std::flush;
|
||||
m_print_time = current_time;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue