code: public void startDaemon(final long interval) {
          if (daemon != null) {
              throw new RuntimeException("Trying to start daemon while it is still running");
          }
          stopDaemon = false;
          daemon = new Thread(new Runnable() {
              @Override
              public void run() {
                  try {
                      while (!stopDaemon) {
                          try {
                              Collection<CompilationUnit> units = execute();
                              if (!units.isEmpty() && compilationListener != null) {
                                  compilationListener.notifySuccessfulCompilation(units);
                              }
                          } catch (LessParseException e) {
                              System.out.println(e.getMessage());
                          }
                          Thread.sleep(interval);
                      }
                  } catch (Exception e) {
                      e.printStackTrace();
                  }
                  daemon = null;
              }
          }, "LessCompilationDaemon");
          daemon.setDaemon(true);
          daemon.start();
      }
docs: Start a daemon thread that will execute this CompilationTask periodically.
  
  @param interval execution interval in milliseconds