C# Class Progression.Extras.ETACalculator

Calculates the "Estimated Time of Arrival" (or more accurately, "Estimated Time of Completion"), based on a "rolling average" of progress over time.
Inheritance: IETACalculator
Exibir arquivo Open project: scottrippey/Progression

Public Methods

Method Description
ETACalculator ( int minimumData, double maximumDuration ) : System

Reset ( ) : void
Update ( float progress ) : void

Adds the current progress to the calculation of ETA.

Private Methods

Method Description
ClearExpired ( ) : void

Method Details

ETACalculator() public method

public ETACalculator ( int minimumData, double maximumDuration ) : System
minimumData int /// The minimum number of data points required before ETA can be calculated. ///
maximumDuration double /// Determines how many seconds of data will be used to calculate the ETA. ///
return System

Reset() public method

public Reset ( ) : void
return void

Update() public method

Adds the current progress to the calculation of ETA.
public Update ( float progress ) : void
progress float The current level of completion. /// Must be between 0.0 and 1.0 (inclusively).
return void