net: allow shortening of linespeed to Gbit/s

This commit is contained in:
Jan Palus 2020-04-09 01:19:36 +02:00 committed by Patrick Ziegler
parent 15496bfb4a
commit 61dfe739d5

View File

@ -308,7 +308,7 @@ namespace net {
* about the current connection * about the current connection
*/ */
string wired_network::linkspeed() const { string wired_network::linkspeed() const {
return m_linkspeed == -1 ? "N/A" : (to_string(m_linkspeed) + " Mbit/s"); return m_linkspeed == -1 ? "N/A" : (m_linkspeed < 1000 ? (to_string(m_linkspeed) + " Mbit/s") : (to_string(m_linkspeed / 1000) + " Gbit/s"));
} }
// }}} // }}}