avoid more conversions to BigDecimal

This commit is contained in:
Zlatin Balevsky
2020-03-17 16:43:31 +00:00
parent fbb710cfc8
commit 509b5c3b99

View File

@@ -160,7 +160,7 @@ public class Downloader {
long dataRead = dataSinceLastRead.getAndSet(0)
long now = System.currentTimeMillis()
if (now > lastSpeedRead)
currSpeed = (int) (dataRead * 1000.0 / (now - lastSpeedRead))
currSpeed = (int) (dataRead * 1000.0d / (now - lastSpeedRead))
lastSpeedRead = now
}