code: public static void waitForOrKill(Process self, long numberOfMillis) {
          ProcessRunner runnable = new ProcessRunner(self);
          Thread thread = new Thread(runnable);
          thread.start();
          runnable.waitForOrKill(numberOfMillis);
      }
docs: Wait for the process to finish during a certain amount of time, otherwise stops the process.
  
  @param self           a Process
  @param numberOfMillis the number of milliseconds to wait before stopping the process
  @since 1.0