public String getEstimatedTimeRemaining ( double theCompleteToDate , double theTotal ) { double millis = getMillis ( ) ; long millisRemaining = ( long ) ( ( ( theTotal / theCompleteToDate ) * millis ) - ( millis ) ) ; return formatMillis ( millisRemaining ) ; }
Given an amount of something completed so far and a total amount calculates how long it will take for something to complete