How to find estimated time remaining ?
-
-
Hi, i have created one portable application,initially it will take several time to install on to pendrive(installer doing more on dll copy option), for that i want to show time remaining in my UI. can any one suggest me best algorithm to do this please
If you know how much data you need to install then you can set a timer to measure your install speed and use that value to estimate how much time the remainder will take. Adjust the value as you go through the install. Something like: Total to install 1Mb After installing 100Kb time taken is 2 seconds, so time left is ((1000 - 100) / 100 * 2) = 18 seconds After installing 200Kb time taken is 3 seconds, so time left is ((1000 - 200 / 200 * 3) = 12 etc.
The best things in life are not things.
-
If you know how much data you need to install then you can set a timer to measure your install speed and use that value to estimate how much time the remainder will take. Adjust the value as you go through the install. Something like: Total to install 1Mb After installing 100Kb time taken is 2 seconds, so time left is ((1000 - 100) / 100 * 2) = 18 seconds After installing 200Kb time taken is 3 seconds, so time left is ((1000 - 200 / 200 * 3) = 12 etc.
The best things in life are not things.
-
yogish293 wrote:
for this always we should know how much size is already installed/copied right...?
Yes, you can only ever make a reasonable estimate by knowing: - How much has already been copied - How much time the copying took - How much data remains
The best things in life are not things.