aboutsummaryrefslogtreecommitdiff
path: root/src/network/connection.h
diff options
context:
space:
mode:
authoryou <ovvv@web.de>2018-06-23 09:16:01 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2018-06-23 09:16:01 +0200
commit968ce9af598024ec71e9ffb2d15c3997a13ad754 (patch)
tree0ad28040f1deb3ca1885d5147b23931d237a76f5 /src/network/connection.h
parent07b1743d3db086f0f984968252d9e3ac71336a7e (diff)
downloadhax-minetest-server-968ce9af598024ec71e9ffb2d15c3997a13ad754.tar.gz
hax-minetest-server-968ce9af598024ec71e9ffb2d15c3997a13ad754.zip
RTT fixes (#7428)
* Few code updates * Do not show average RTT before timing out * Fix unwanted integer division in RTTStatistics * Fix float format, prettier jitter calculation * Use +=, 0.1f -> 100.0f for stronger average updates
Diffstat (limited to 'src/network/connection.h')
-rw-r--r--src/network/connection.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/connection.h b/src/network/connection.h
index 2fc344169..f65540c8c 100644
--- a/src/network/connection.h
+++ b/src/network/connection.h
@@ -593,15 +593,15 @@ class Peer {
return m_rtt.jitter_max;
case AVG_JITTER:
return m_rtt.jitter_avg;
+ case TIMEOUT_COUNTER:
+ return m_timeout_counter;
}
return -1;
}
protected:
virtual void reportRTT(float rtt) {};
- void RTTStatistics(float rtt,
- const std::string &profiler_id = "",
- unsigned int num_samples = 1000);
+ void RTTStatistics(float rtt, const std::string &profiler_id = "");
bool IncUseCount();
void DecUseCount();