diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/SingleThreadTask.java b/Aria/src/main/java/com/arialyy/aria/core/download/SingleThreadTask.java index bb2cb8ea..96a1a276 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/SingleThreadTask.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/SingleThreadTask.java @@ -65,7 +65,11 @@ final class SingleThreadTask implements Runnable { if (-0.9999 < maxSpeed && maxSpeed < 0.00001) { mSleepTime = 0; } else { - mSleepTime = (long) ((mBufSize / 1024) * CONSTANCE.THREAD_NUM / maxSpeed * 1000); + BigDecimal db = new BigDecimal((mBufSize / 1024) / maxSpeed * 1000); + db.setScale(2, BigDecimal.ROUND_UP); + mSleepTime = db.longValue(); + //mSleepTime = (long) ((mBufSize / 1024) * CONSTANCE.THREAD_NUM / maxSpeed * 1000); + //mSleepTime = (long) ((mBufSize / 1024) / maxSpeed * 1000); } }