summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOblomov <giuseppe.bilotta@gmail.com>2020-10-29 20:09:59 +0100
committerGitHub <noreply@github.com>2020-10-29 20:09:59 +0100
commita701d24a0070f3f581c47e5722aa07d4f89d7b98 (patch)
treeeb9234c9af89446554551f6b4a54c9f44390b64d
parent68cd93b8657c0c8cad0196e79fb63e3275322e38 (diff)
downloadminetest-a701d24a0070f3f581c47e5722aa07d4f89d7b98.tar.gz
minetest-a701d24a0070f3f581c47e5722aa07d4f89d7b98.tar.bz2
minetest-a701d24a0070f3f581c47e5722aa07d4f89d7b98.zip
Show RTT in ms with 2 digits of precision (#10573)
If your ping is in seconds, you probably have other problems.
-rw-r--r--src/client/gameui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/gameui.cpp b/src/client/gameui.cpp
index 75e7d15b9..0c08efeb5 100644
--- a/src/client/gameui.cpp
+++ b/src/client/gameui.cpp
@@ -116,8 +116,8 @@ void GameUI::update(const RunStats &stats, Client *client, MapDrawControl *draw_
<< std::setprecision(1)
<< " | view range: "
<< (draw_control->range_all ? "All" : itos(draw_control->wanted_range))
- << std::setprecision(3)
- << " | RTT: " << client->getRTT() << "s";
+ << std::setprecision(2)
+ << " | RTT: " << (client->getRTT() * 1000.0f) << "ms";
setStaticText(m_guitext, utf8_to_wide(os.str()).c_str());
m_guitext->setRelativePosition(core::rect<s32>(5, 5, screensize.X,