aboutsummaryrefslogtreecommitdiff
path: root/src/client.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.h')
-rw-r--r--src/client.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client.h b/src/client.h
index bfec7730d..3c8bbfaf6 100644
--- a/src/client.h
+++ b/src/client.h
@@ -251,6 +251,15 @@ public:
v3s16 blockpos = ((ClientMap&)m_env.getMap()).clearTempMod(p);
m_env.getMap().updateMeshes(blockpos, m_env.getDayNightRatio());
}
+
+ float getAvgRtt()
+ {
+ JMutexAutoLock lock(m_con_mutex);
+ con::Peer *peer = m_con.GetPeerNoEx(PEER_ID_SERVER);
+ if(peer == NULL)
+ return 0.0;
+ return peer->avg_rtt;
+ }
private: