Bug 1392270 - Fix download.estimatedEndTime calculation. r=aswan

MozReview-Commit-ID: HqyYLtTC3N6

--HG--
extra : rebase_source : be06517bd1bee99676a3bedd6fb16f35f82e788b
This commit is contained in:
Tim Nguyen 2017-08-22 20:32:11 +02:00
Родитель ab399cee7e
Коммит cbab6d9aea
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -66,8 +66,8 @@ class DownloadItem {
// Based on the code in summarizeDownloads() in DownloadsCommon.jsm
if (this.download.hasProgress && this.download.speed > 0) {
let sizeLeft = this.download.totalBytes - this.download.currentBytes;
let rawTimeLeft = sizeLeft / this.download.speed;
return new Date(Date.now() + rawTimeLeft);
let timeLeftInSeconds = sizeLeft / this.download.speed;
return new Date(Date.now() + (timeLeftInSeconds * 1000));
}
}
get state() {