1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00
* 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
This commit is contained in:
you 2018-06-23 09:16:01 +02:00 committed by Loïc Blot
parent 07b1743d3d
commit 968ce9af59
5 changed files with 34 additions and 39 deletions

View file

@ -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();