def select_until(read_array, write_array, err_array, timeout_at)
      if !timeout_at
        return IO.select(read_array, write_array, err_array)
      end

      remaining = (timeout_at - Time.now)
      return nil if remaining <= 0

      IO.select(read_array, write_array, err_array, remaining)
    end
def select_until(read_array, write_array, err_array, timeout_at)
      if !timeout_at
        return IO.select(read_array, write_array, err_array)
      end

      remaining = (timeout_at - Time.now)
      return nil if remaining <= 0

      IO.select(read_array, write_array, err_array, remaining)
    end
Call IO.select timing out at Time `timeout_at`. If `timeout_at` is nil, never times out.