lib/socketry/timeout.rb
def start_timer(timer = DEFAULT_TIMER.new)
      raise Socketry::InternalError, "timer already started" if defined?(@timer)
      raise Socketry::InternalError, "deadline already set"  if defined?(@deadline)

      @deadline = nil
      @timer = timer
      @timer.start
      true
    end
def start_timer(timer = DEFAULT_TIMER.new)
      raise Socketry::InternalError, "timer already started" if defined?(@timer)
      raise Socketry::InternalError, "deadline already set"  if defined?(@deadline)

      @deadline = nil
      @timer = timer
      @timer.start
      true
    end
Start a timer in the included object

 @param timer [#start, #to_f] a timer object (ideally monotonic)
 @return [true] timer started successfully
 @raise [Socketry::InternalError] if timer is already started