Calculate Time Remaining

后端 未结 16 2612
一生所求
一生所求 2020-12-04 08:22

What\'s a good algorithm for determining the remaining time for something to complete? I know how many total lines there are, and how many have completed already, how shoul

16条回答
  •  -上瘾入骨i
    2020-12-04 09:19

    I already knew the percentage complete & time elapsed, so this helped me:

    TimeElapsed * ((100 - %complete) / %complete) = TimeRemaining

    I then updated this value every time %complete changed, giving me a constant varying ETA.

提交回复
热议问题