计算剩余时间剩余时间

由网友(飞烟轻若梦)分享简介:什么是好的算法来确定的东西来完成余下的时间呢?我知道一共有多少行有,又有多少已经完成了,我应该怎么估计剩余时间?What's a good algorithm for determining the remaining time for something to complete? I know how many...

什么是好的算法来确定的东西来完成余下的时间呢?我知道一共有多少行有,又有多少已经完成了,我应该怎么估计剩余时间?

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 should I estimate the time remaining?

推荐答案

为什么不呢?

(linesProcessed / TimeTaken) (timetaken / linesProcessed)* LinesLeft =的timeleft

的timeleft 届时将pssed在EX $ P $任何单位时间 timeTaken

TimeLeft will then be expressed in whatever unit of time timeTaken is.

感谢您的评论,你说的没错,这应该是:

Thanks for the comment you're right this should be:

(TimeTaken / linesProcessed)* linesLeft =的timeleft

所以我们有

(10/100)* 200 = 20秒,现在10秒晃过 (20/100)* 200 = 40秒,现在剩下10多秒,我们处理100多行 (30/200)* 100 = 15秒,现在大家都明白为什么复制文件对话框从3小时跳跃到30分钟:-)

(10 / 100) * 200 = 20 Seconds now 10 seconds go past (20 / 100) * 200 = 40 Seconds left now 10 more seconds and we process 100 more lines (30 / 200) * 100 = 15 Seconds and now we all see why the copy file dialog jumps from 3 hours to 30 minutes :-)

阅读全文

相关推荐

最新文章