boolean waitFor(long millis) {
    long deadline = System.currentTimeMillis() + millis;
    try {
      for (Job<Void> job : mySubmittedPasses.values()) {
        if (!job.waitForCompletion((int)(System.currentTimeMillis() - deadline))) {
          return false;
        }
      }
      return true;
    }
    catch (InterruptedException e) {
      return true;
    }
  }
boolean waitFor(long millis)