Method: Progressor::LimitedSequence#eta
- Defined in:
- lib/progressor/limited_sequence.rb
#eta ⇒ Object
Returns an estimation for the Estimated Time of Arrival (time until done).
Calculated by multiplying the average time per iteration with the remaining number of loops.
113 114 115 116 117 118 |
# File 'lib/progressor/limited_sequence.rb', line 113 def eta return nil if @measurements.count < min_samples remaining_time = per_iteration * (@total_count - @current) remaining_time.round(2) end |