summaryrefslogtreecommitdiff
path: root/node/Path.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2019-06-13 12:53:05 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2019-06-13 12:53:05 -0700
commit97975402120d565dd211f9d470e7b192641712c5 (patch)
tree9f7a2db5ea4c9568d6b801d52b1fffd857565767 /node/Path.hpp
parentce2338c24a46558a2e0fdb7ebbcf2e6ce9c8b615 (diff)
parent3b188ba672559ff80264a8fab32699ebdbf928fe (diff)
downloadinfinitytier-97975402120d565dd211f9d470e7b192641712c5.tar.gz
infinitytier-97975402120d565dd211f9d470e7b192641712c5.zip
merge
Diffstat (limited to 'node/Path.hpp')
-rw-r--r--node/Path.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/node/Path.hpp b/node/Path.hpp
index e1e65cb4..5b966f6b 100644
--- a/node/Path.hpp
+++ b/node/Path.hpp
@@ -351,7 +351,7 @@ public:
_unackedBytes = (ackedBytes > _unackedBytes) ? 0 : _unackedBytes - ackedBytes;
int64_t timeSinceThroughputEstimate = (now - _lastThroughputEstimation);
if (timeSinceThroughputEstimate >= ZT_PATH_THROUGHPUT_MEASUREMENT_INTERVAL) {
- uint64_t throughput = (float)(_bytesAckedSinceLastThroughputEstimation * 8) / ((float)timeSinceThroughputEstimate / (float)1000);
+ uint64_t throughput = (uint64_t)((float)(_bytesAckedSinceLastThroughputEstimation * 8) / ((float)timeSinceThroughputEstimate / (float)1000));
_throughputSamples.push(throughput);
_maxLifetimeThroughput = throughput > _maxLifetimeThroughput ? throughput : _maxLifetimeThroughput;
_lastThroughputEstimation = now;
@@ -416,7 +416,7 @@ public:
if (it != _outQoSRecords.end()) {
uint16_t rtt = (uint16_t)(now - it->second);
uint16_t rtt_compensated = rtt - rx_ts[j];
- float latency = rtt_compensated / 2.0;
+ uint16_t latency = rtt_compensated / 2;
updateLatency(latency, now);
_outQoSRecords.erase(it);
}