Closed Bug 1392270 Opened 7 years ago Closed 7 years ago

Fix download.estimatedEndTime calculation

Categories

(WebExtensions :: General, defect)

defect
Not set
normal

Tracking

(firefox57 fixed)

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: ntim, Assigned: ntim)

References

Details

Attachments

(1 file)

The speed is in bytes/sec, hence the time left is in seconds.

but new Date() accepts milliseconds in its constructor.
Summary: Fix download.estimatedEndTime units → Fix download.estimatedEndTime calculation
Comment on attachment 8899485 [details]
Bug 1392270 - Fix download.estimatedEndTime calculation.

https://reviewboard.mozilla.org/r/170764/#review176396

Please compute the time in seconds and then multiply by 1000.  A reader looking at the expression `sizeLeft * 1000` is going to be unnecessarily misled.
If you do that, `rawTimeLeft` can be renamed to `timeLeftInSeconds` or something and then no comment is necessary.
Attachment #8899485 - Flags: review?(aswan) → review-
Comment on attachment 8899485 [details]
Bug 1392270 - Fix download.estimatedEndTime calculation.

https://reviewboard.mozilla.org/r/170764/#review176620

Thanks!
Attachment #8899485 - Flags: review?(aswan) → review+
Pushed by ntim.bugs@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/e2049dd3fa18
Fix download.estimatedEndTime calculation. r=aswan
https://hg.mozilla.org/mozilla-central/rev/e2049dd3fa18
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: