Original Post
So I wrote a power function ala: http://osix.net/modules/article/?id=696
and I would greatly prefer to implement a form of progress indication with this function.
I started by calculating the total iteration depth that the function will reach, before starting the recursion.
Then I track the current depth, but each iteration is longer than the one before it, maybe ~4x longer than the previous one.
I have a showprogress(int progress, int total) function that I call in the middle of each iteration after some work has been done, before entering the next iteration.
I have manipulated the values using sqrt, squaring, etc.. but I can't seem to figure a good way to warp the linear values to align better with the actual work that is being done.. The end result is that my ETA increases with each iteration, and the whole execution completes beyond any ETA from any iteration. I've successfully hacked together good progress/total manipulation before, but this particular instance is baffling me. Any ideas ?
and I would greatly prefer to implement a form of progress indication with this function.
I started by calculating the total iteration depth that the function will reach, before starting the recursion.
Then I track the current depth, but each iteration is longer than the one before it, maybe ~4x longer than the previous one.
I have a showprogress(int progress, int total) function that I call in the middle of each iteration after some work has been done, before entering the next iteration.
I have manipulated the values using sqrt, squaring, etc.. but I can't seem to figure a good way to warp the linear values to align better with the actual work that is being done.. The end result is that my ETA increases with each iteration, and the whole execution completes beyond any ETA from any iteration. I've successfully hacked together good progress/total manipulation before, but this particular instance is baffling me. Any ideas ?