code: public LauncherStatus run(final Configuration driverConfig, final long timeOut) {
  
      final long startTime = System.currentTimeMillis();
  
      this.reef.submit(driverConfig);
      this.waitForStatus(timeOut - System.currentTimeMillis() + startTime, LauncherStatus.COMPLETED);
  
      if (System.currentTimeMillis() - startTime >= timeOut) {
        LOG.log(Level.WARNING, "The Job timed out.");
        synchronized (this) {
          this.status = LauncherStatus.FORCE_CLOSED;
        }
      }
  
      this.reef.close();
      return this.getStatus();
    }
docs: Run a job with a waiting timeout after which it will be killed, if it did not complete yet.
  
  @param driverConfig the configuration for the driver. See DriverConfiguration for details.
  @param timeOut timeout on the job.
  @return the state of the job after execution.