def compute_eta(start_time, current_value, final_value):
 elapsed = (time.time() - start_time)
 completion = ((float(current_value) / final_value) or 1e-05)
 return get_time_units((((1.0 / completion) * elapsed) - elapsed))

def compute_eta ( start_time , current_value , final_value ) : elapsed = ( time . time ( ) - start_time ) completion = ( ( float ( current_value ) / final_value ) or 1e-05 ) return get_time_units ( ( ( ( 1.0 / completion ) * elapsed ) - elapsed ) )
compute an eta .