Skip to content

Commit

Permalink
fix formatting for machines with larger number of devices (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
tenox7 authored Apr 19, 2022
1 parent ad969d9 commit b9a26bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/console_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ void usbtop::ConsoleOutput::print_stats_bus(UsbBus const& bus)
for (it = devs.begin(); it != devs.end(); it++) {
UsbDevice const& dev(*it->second);
UsbStats const& stats(dev.stats());
std::cout << " Device ID " << it->first << " :\t";
std::cout << " Device ID " << std::setw(3) << it->first << " :\t";
double stats_to = stats.stats_to_device().bw_instant()/1024.0;
double stats_from = stats.stats_from_device().bw_instant()/1024.0;
std::cout << "\t\t" << stats_to << " KiB/s\t" << stats_from << " KiB/s" << std::endl;
std::cout << "\t\t\t" << stats_to << " KiB/s\t" << stats_from << " KiB/s" << std::endl;
}
}

0 comments on commit b9a26bd

Please sign in to comment.