Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying an estimate of a procedures run-time

Status
Not open for further replies.

fenris

Programmer
May 20, 1999
824
CA
I have a program that has to calculate a large number of permutions (12! to be exact) and I would like to be able to display an estimate of long till the program is finished it's calculations (something similar to what IE displays when downloading a file).


I was thinking of using the gettickcount api and having the program go through several iterations of the calculations and then determine a runtime from that, periodically updating the estimate.

Is there a better way? Troy Williams B.Eng.
fenris@hotmail.com

 
The appraoch you outline is probably O.K., but may not be much more accurate than just getting a 'ball-park' figure from a few (timed) manual executions and 'asssuming' the average for all. If you use this, just Multiply the 12! times the avg and use it as the total, decrmenting the 'time-to-go' with each iteration.

I am sure that you are aware that ~500K iterations of 'something' needs to be quite a simple calculation to get finished in a reasonable time.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top