I’m making a program and I want to give to the user information about the estimated times every 1000 elements processed. I’m calculating time in this way:
- C = elements processed so far
- MAX = Max elements to process
- Tp = time elapsed
- Te = time estimated
In theory, the relation between elements processed and elapsed time is equal to the relation between the rest of the elements and the rest of time, so my formula is:
(C/Tp) = (MAX – C)/(Te – Tp)
So I need to solve Te by doing:
(Te – Tp) = (MAX – C)Tp/C
And finally:
Te = (MAX – C)Tp/C + Tp
I think that resolution is correct but clearly, operation doesn’t tend to 0 as C and Tp grows, so I’m sure that I’m doing a stupid mistake but I couldn’t find.
Some ideas please?
I think your initial equation is slightly off, rather than what you have it should be
since we’re estimating the time required to process each item, and this should be constant and equal in the past and the future. This will give you a final equation
which tends to zero as expected.
(This is assuming that
Teis the estimated time left, not estimated total time)