Calculate estimated time remaining

2.1k Views Asked by At

I made a script which installs several applications (Adobe Reader, Spotify, Microsoft Office, etc.). It's used after Windows installation. I would like to display estimated remaining time of current installation.

The problem is it differs per computer. How to calculate remaining time using

  • time taken to install previous applications,
  • amount of applications in total and
  • the count of already installed applications.

Average wouldn't help since some applications install 10 seconds and other 5 minutes. How to resolve this issue?

1

There are 1 best solutions below

0
On

… how could I calculate the remaining time if I know time taken to install previous applications, the count of applications in total and the count of already installed applications.

It is impossible to (accurately) calculate remaining time.

Cost of operation is defined by amount of CPU cycles but bears no relation to time as cycle management is controlled by factors external to the program requesting them. As a result, even two consecutive executions (same program, same system) vary by time needed to complete. As for:

… any idea how could i resolve this issue.