我们如何估计程序完成所需的时间并将其反映到进度条上? [英] How can we estimate the time needed for program to complete and reflect that to progress bar?

查看:56
本文介绍了我们如何估计程序完成所需的时间并将其反映到进度条上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这不是特定于编程语言的.

This is not programming language specific.

我只需要了解如何估计完成流程所需的时间?例如解压缩文件或刻录CD?哪些因素会提高这种计算的准确性?

I just need to understand how can I estimate the time needed for a process to complete ? Such as unzipping file for example or burning a CD ? What are the factors that enhance the accuracy of this calculatio ?

任何编程语言中的一些示例当然会有所帮助.

Some examples in any programming language will help of course.

推荐答案

记录实际使用时间及相关因素;在类似情况下,根据过去运行的平均值估计未来时间.在大多数情况下,它永远不会那么准确,但我认为总比没有好.

Record the actual times taken and relevant factors; estimate future times based the averages of past runs with in similar situations. In most cases it will never be all that accurate, but it's better than nothing I suppose.

正如您所说,这不是特定于语言的,而是非常特定于情况的;与刻录光盘相关的因素可能与影响解压缩文件时间的因素不同.

As you say, this isn't language specific, but it is very situation specific; the factors that are relevant to burning a disc are probably different to the factors that influence the time to unzip a file.

这篇关于我们如何估计程序完成所需的时间并将其反映到进度条上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆