Predict programme finish time
Posted on 2011-02-14
I have some programs which run for a long time; sometimes they run for days/weeks. I can calculate how far through a programme is in percent. What I would like to do is predict (roughly, assuming the programme speed is linear) when a programme should finish.
I have thought that this should be possible by recording the date and time when the programme starts, and then using the current percentage to predict forwards. What I would like is to be able to display a string, containing an estimated time left; perhaps like this:
w0 d13 h17 m22
One thing is that, I currently (due to computer setup) I have another programme displaying the current progress of a programme. Therefore, I have a programme (which I want to monitor and predict finish time for) saving the current progress to a file. This file is then read by the other programme and displays the progress to the user. Therefore, the start time would need to be saved to this same text file and read by the other programme.
Any suggestions? Thoughts?