code: public long getNextTimeout(long lastTimeout)
      {
          // Perform basic validation of lastTimeout, which should be a value that
          // was previously returned from getFirstTimeout.
  
          if (lastTimeout < start)
          {
              throw new IllegalArgumentException("last timeout " + lastTimeout + " is before start time " + start);
          }
  
          if (lastTimeout > end)
          {
              throw new IllegalArgumentException("last timeout " + lastTimeout + " is after end time " + end);
          }
  
          if (lastTimeout % 1000 != 0) // d666295
          {
              throw new IllegalArgumentException("last timeout " + lastTimeout + " is mid-second");
          }
  
          return getTimeout(lastTimeout, true);
      }
docs: Determines the next timeout for the schedule expression.
  
  @param lastTimeout the last timeout in milliseconds
  @return the next timeout in milliseconds, or -1 if there are no more
  future timeouts for the expression
  @throws IllegalArgumentException if lastTimeout is before the start time
  of the expression