/** * Schedules the specified task for execution at the specified time. If * the time is in the past, the task is scheduled for immediate execution. * * @param task task to be scheduled. * @param time time at which task is to be executed. * @throws IllegalArgumentException if <tt>time.getTime()</tt> is negative. * @throws IllegalStateException if task was already scheduled or * cancelled, timer was cancelled, or timer thread terminated. * @throws NullPointerException if {@code task} or {@code time} is null */ public void schedule(TimerTask task, Date time) { sched(task, time.getTime(), 0); }
/** * Schedules the specified task for execution at the specified time. If * the time is in the past, the task is scheduled for immediate execution. * * @param task task to be scheduled. * @param time time at which task is to be executed. * @throws IllegalArgumentException if <tt>time.getTime()</tt> is negative. * @throws IllegalStateException if task was already scheduled or * cancelled, timer was cancelled, or timer thread terminated. * @throws NullPointerException if {@code task} or {@code time} is null */ public void schedule(TimerTask task, Date time) { sched(task, time.getTime(), 0); }
/** * Schedules the specified task for execution at the specified time. If * the time is in the past, the task is scheduled for immediate execution. * * @param task task to be scheduled. * @param time time at which task is to be executed. * @throws IllegalArgumentException if <tt>time.getTime()</tt> is negative. * @throws IllegalStateException if task was already scheduled or * cancelled, timer was cancelled, or timer thread terminated. * @throws NullPointerException if {@code task} or {@code time} is null */ public void schedule(TimerTask task, Date time) { sched(task, time.getTime(), 0); }
/** * Schedules the specified task for execution after the specified delay. * * @param task task to be scheduled. * @param delay delay in milliseconds before task is to be executed. * @throws IllegalArgumentException if <tt>delay</tt> is negative, or * <tt>delay + System.currentTimeMillis()</tt> is negative. * @throws IllegalStateException if task was already scheduled or * cancelled, timer was cancelled, or timer thread terminated. * @throws NullPointerException if {@code task} is null */ public void schedule(TimerTask task, long delay) { if (delay < 0) throw new IllegalArgumentException("Negative delay."); sched(task, System.currentTimeMillis() + delay, 0); }
if (period <= 0) throw new IllegalArgumentException("Non-positive period."); sched(task, firstTime.getTime(), period);
/** * Schedules the specified task for execution after the specified delay. * * @param task task to be scheduled. * @param delay delay in milliseconds before task is to be executed. * @throws IllegalArgumentException if <tt>delay</tt> is negative, or * <tt>delay + System.currentTimeMillis()</tt> is negative. * @throws IllegalStateException if task was already scheduled or * cancelled, timer was cancelled, or timer thread terminated. * @throws NullPointerException if {@code task} is null */ public void schedule(TimerTask task, long delay) { if (delay < 0) throw new IllegalArgumentException("Negative delay."); sched(task, System.currentTimeMillis()+delay, 0); }
if (period <= 0) throw new IllegalArgumentException("Non-positive period."); sched(task, firstTime.getTime(), period);
if (period <= 0) throw new IllegalArgumentException("Non-positive period."); sched(task, firstTime.getTime(), -period);
/** * Schedules the specified task for execution after the specified delay. * * @param task task to be scheduled. * @param delay delay in milliseconds before task is to be executed. * @throws IllegalArgumentException if <tt>delay</tt> is negative, or * <tt>delay + System.currentTimeMillis()</tt> is negative. * @throws IllegalStateException if task was already scheduled or * cancelled, timer was cancelled, or timer thread terminated. * @throws NullPointerException if {@code task} is null */ public void schedule(TimerTask task, long delay) { if (delay < 0) throw new IllegalArgumentException("Negative delay."); sched(task, System.currentTimeMillis()+delay, 0); }
if (period <= 0) throw new IllegalArgumentException("Non-positive period."); sched(task, firstTime.getTime(), -period);
sched(task, firstTime.getTime(), -period);
sched(task, firstTime.getTime(), period);
if (period <= 0) throw new IllegalArgumentException("Non-positive period."); sched(task, System.currentTimeMillis() + delay, period);
if (period <= 0) throw new IllegalArgumentException("Non-positive period."); sched(task, System.currentTimeMillis() + delay, -period);
if (period <= 0) throw new IllegalArgumentException("Non-positive period."); sched(task, System.currentTimeMillis()+delay, -period);
if (period <= 0) throw new IllegalArgumentException("Non-positive period."); sched(task, System.currentTimeMillis()+delay, period);
if (period <= 0) throw new IllegalArgumentException("Non-positive period."); sched(task, System.currentTimeMillis()+delay, period);
if (period <= 0) throw new IllegalArgumentException("Non-positive period."); sched(task, System.currentTimeMillis()+delay, -period);