17 Jul
2023
17 Jul
'23
9:07 p.m.
asdf asdf asdf :) - we can solve the 2nd order polynomial for idx=remaining_count-1 to figure out delay - if now > mark_time + delay, then we can set delay = 0 and send the next one immediately, assuming the code then updates the delay after this, because we have ratelimit_count remaining anyway def reversetimepoints(idx, mark_time, min_delay, eta, remaining_count): # reversetimepoints[remaining_count] = mark_time # reversetimepoints[1] = eta - min_delay # reversetimepoints[0] = eta # y(x) = ax^2 + bx + c a = -((eta - mark_time) / remaining_count - min_delay) / (remaining_count - 1) b = -(a + min_delay) c = eta return (a * idx + b) * idx + c