diff options
author | Grant Limberg <grant.limberg@zerotier.com> | 2019-06-13 10:27:54 -0700 |
---|---|---|
committer | Grant Limberg <grant.limberg@zerotier.com> | 2019-06-13 10:28:09 -0700 |
commit | 47d29ddcaf677a5376f54e6901bcdc38e499b16d (patch) | |
tree | 41a840d935dc2a90b063ac619008bcc085e67c75 /node/Path.hpp | |
parent | f411eb1651bbfaa276eab02cf368e9fcb3905a15 (diff) | |
download | infinitytier-47d29ddcaf677a5376f54e6901bcdc38e499b16d.tar.gz infinitytier-47d29ddcaf677a5376f54e6901bcdc38e499b16d.zip |
Compiler warning cleanup
Diffstat (limited to 'node/Path.hpp')
-rw-r--r-- | node/Path.hpp | 4 |
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); } |