positiveDelay(delay); positivePeriod(period); long time = System.currentTimeMillis() + delay; schedule(task, time, period, false);
if (time < 0) throw new IllegalArgumentException("negative time");  if (task.scheduled == 0 && task.lastExecutionTime == -1) { task.scheduled = time; task.period = period; task.fixed = fixed; } else { throw new IllegalStateException ("task was already scheduled or canceled"); }  if (!this.canceled && this.thread != null) { queue.enqueue(task); } else { throw new IllegalStateException ("timer was canceled or scheduler thread has died"); }
  public void schedule(TimerTask task, long delay, long period)  {    positiveDelay(delay);    positivePeriod(period);    long time = System.currentTimeMillis() + delay;    schedule(task, time, period, false);  }