class TTY::Spinner

def auto_spin

Other tags:
    Api: - public
def auto_spin
  CURSOR_LOCK.synchronize do
    start
    sleep_time = 1.0 / @interval
    spin
    @thread = Thread.new do
      sleep(sleep_time)
      while @started_at
        if Thread.current['pause']
          Thread.stop
          Thread.current['pause'] = false
        end
        spin
        sleep(sleep_time)
      end
    end
  end
ensure
  if @hide_cursor
    write(TTY::Cursor.show, false)
  end
end