Quakespotter.app/lib/ruby-processing/runners/watch.rb
# Kicks off a thread to watch the sketch, reloading Ruby-Processing
# and restarting the sketch whenever it changes.
Kicks off a thread to watch the sketch, reloading Ruby-Processing
and restarting the sketch whenever it changes.
Kicks off a thread to watch the sketch reloading Ruby - Processing and restarting the sketch whenever it changes .
def start_watching
      @runner = Thread.start { Processing.load_and_run_sketch } unless $app
      thread = Thread.start do
        loop do
          file_mtime = File.stat(@file).mtime
          if file_mtime > @time
            @time = file_mtime
            wipe_out_current_app!
            GC.start
            @runner = Thread.start { Processing.load_and_run_sketch }
          end
          sleep 0.33
        end
      end
      thread.join
    end
def start_watching @runner = Thread . start { Processing . load_and_run_sketch } unless $app thread = Thread . start do loop do file_mtime = File . stat ( @file ) . mtime if file_mtime > @time @time = file_mtime wipe_out_current_app! GC . start @runner = Thread . start { Processing . load_and_run_sketch } end sleep 0.33 end end thread . join end
Kicks off a thread to watch the sketch, reloading Ruby-Processing
and restarting the sketch whenever it changes.
Kicks off a thread to watch the sketch reloading Ruby - Processing and restarting the sketch whenever it changes .
# Taking it out the reset until it can be made to work more reliably # rewind_to_recorded_state