package org.fakereplace.detector;


/**
 * 
 * Calls the ClassChangeDetector every POLL_TIME milliseconds
 * 
 * @author Stuart Douglas <stuart@baileyroberts.com.au>
 * 
 */
public class ClassChangeDetectorRunner implements Runnable
{

   static final int POLL_TIME = 2000;

   public void run()
   {
      // no need to do anything for the first 5 seconds
      sleep(5000);
      while (true)
      {
         // wait 2 seconds
         sleep(POLL_TIME);
         try
         {
            ClassChangeDetector.runDefault();
         }
         catch (Exception e)
         {
            e.printStackTrace();
         }

      }
   }

   public void sleep(int millis)
   {
      try
      {
         Thread.sleep(millis);
      }
      catch (InterruptedException e)
      {

      }
   }

}

@@ -28,17 +28,16 @@
 ector;%0A%0A
-%0A
 /**%0A * %0A
@@ -289,24 +289,179 @@
  run()%0A   %7B%0A
+      String detect = System.getProperty(%22org.fakereplace.detector%22);%0A      if (detect == null %7C%7C !detect.equals(%22true%22))%0A      %7B%0A         return;%0A      %7D%0A
       // no 

disable detector by default