LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
|
A progress counter that can estimate how much time is left. More...
#include <ProgressCounters.hpp>
Public Member Functions | |
EstimatingCounter (const uint n) | |
void | setExpected (uint) |
Alter the expected count. | |
uint | remaining (void) |
Returns the number of iterations left. | |
double | timeRemaining (void) |
double | fractionComplete (void) |
Returns the percent completed so far. | |
Public Member Functions inherited from loos::SimpleCounter | |
void | attach (ObsT *) |
void | detach (ObsT *) |
virtual void | notify (void) |
Notify observers that an update should occur. | |
virtual void | finish (void) |
Notify observers that we've finished with our calculation. | |
virtual void | start (void) |
Notify observers that we're starting a calculation. | |
uint | count (void) const |
Number of iterations we've seen so far. | |
virtual double | elapsed (void) |
Total elapsed wall-time. | |
Protected Attributes | |
uint | expected |
Protected Attributes inherited from loos::SimpleCounter | |
uint | count_ |
Timer< WallTimer > | timer_ |
Observers | observers |
A progress counter that can estimate how much time is left.
This class has to know the count of expected iterations so it can estimate how much time is left. It is assumed that the execution time per iteration is largely constant.
|
virtual |
Returns the percent completed so far.
Reimplemented from loos::SimpleCounter.
|
virtual |
Returns the number of iterations left.
Reimplemented from loos::SimpleCounter.
|
virtual |
Estimates the amount of time left using the current average time per iteration
Reimplemented from loos::SimpleCounter.