mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-01-05 08:19:56 +01:00
Bugfix for incorrect speed calculation, thanks to Dashiva for spotting it.
This commit is contained in:
parent
78b4301147
commit
97c038cd06
|
|
@ -767,7 +767,7 @@ public class AppletLoader extends Applet implements Runnable, AppletStub {
|
|||
// update only if a second or more has passed
|
||||
if (timeLapse >= 1000) {
|
||||
// get kb/s, nice that bytes/millis is same as kilobytes/seconds
|
||||
float downloadSpeed = (float) bufferSize / timeLapse;
|
||||
float downloadSpeed = (float) downloadedAmount / timeLapse;
|
||||
// round to two decimal places
|
||||
downloadSpeed = ((int)(downloadSpeed*100))/100f;
|
||||
// set current speed message
|
||||
|
|
|
|||
Loading…
Reference in a new issue