port to file2, other minor improvements

This commit is contained in:
2024-05-27 11:20:37 +02:00
parent eb2a19d8f3
commit 57575330dd
4 changed files with 74 additions and 56 deletions

View File

@@ -6,7 +6,8 @@
#include <algorithm>
float FlowOnly::getCurrentDelay(void) const {
return std::min(_rtt_ema, RTT_MAX);
// below 1ms is useless
return std::clamp(_rtt_ema, 0.001f, RTT_MAX);
}
void FlowOnly::addRTT(float new_delay) {