1
0
Fork 0
forked from lthn/blockchain

fixed std::out state change

This commit is contained in:
sowle 2020-03-20 13:51:37 +03:00
parent 3f56487838
commit 78a627afc5
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -79,6 +79,7 @@ namespace tools
auto dif = std::chrono::system_clock::now() - last_update;
if (dif >= std::chrono::milliseconds(300))
{
boost::io::ios_flags_saver ifs(std::cout);
std::cout << "Received " << received_bytes / 1048576 << " of " << total_bytes / 1048576 << " MiB ( " << std::fixed << std::setprecision(1) << 100.0 * received_bytes / total_bytes << " %)\r";
last_update = std::chrono::system_clock::now();
}