class SplitIoClient::Engine::BackOff

def initialize(back_off_base, attempt = 0, max_allowed = BACKOFF_MAX_ALLOWED)

def initialize(back_off_base, attempt = 0, max_allowed = BACKOFF_MAX_ALLOWED)
  @attempt = attempt
  @back_off_base = back_off_base
  @max_allowed = max_allowed
end

def interval

def interval
  interval = 0
  interval = (@back_off_base * (2**@attempt)) if @attempt.positive?
  @attempt += 1
  interval >= @max_allowed ? @max_allowed : interval
end

def reset

def reset
  @attempt = 0
end