src/ProgressBar.h
// If after time T1 we have completed proportion P of the task, then how long T do we expect the task to take ?
//  T1/T = P
//  => T = T1/P
//  If p is permill, then p = P*1000
//  => T = T1/(p/1000)
//  => T = 1000*T1/p, where T1 and T have the same units (milliseconds in this case) 
If after time T1 we have completed proportion P of the task, then how long T do we expect the task to take .
If after time T1 we have completed proportion P of the task then how long T do we expect the task to take .
double PredictEnd( int permill )
    {
        if( permill == 0 )
            permill = 1;
        double elapsed = timer.Elapsed();
        return (1000*elapsed) / permill;
    }
double PredictEnd ( int permill ) { if ( permill == 0 ) permill = 1 ; double elapsed = timer . Elapsed ( ) ; return ( 1000 * elapsed ) / permill ; }
If after time T1 we have completed proportion P of the task, then how long T do we expect the task to take ?
If after time T1 we have completed proportion P of the task then how long T do we expect the task to take ?