What's the best way to calculate remaining download time?

前端 未结 7 981
野性不改
野性不改 2020-12-04 18:43

Let\'s say you want to calculate the remaining download time, and you have all the information needed, that is: File size, dl\'ed size, size left, time elapsed, momentary dl

7条回答
  •  清歌不尽
    2020-12-04 19:05

    For anyone interested, I wrote an open-source library in C# called Progression that has a "moving-average" implementation: ETACalculator.cs.

    The Progression library defines an easy-to-use structure for reporting several types of progress. It also easily handles nested progress for very smooth progress reporting.

提交回复
热议问题