API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util. Timer View Source
Author(s)
Josh Bloch
Since
1.3
Version
1.19, 01/27/06
Serial
Hierarchy
 Object
      Timer
Implements
Subclasses
Description
public class Timer
  A facility for threads to schedule tasks for future execution in a background thread.
See also:    TimerTask Object.wait(long)
Constructors
public Timer ()
  Creates a new timer.
public Timer (boolean isDaemon)
  Creates a new timer whose associated thread may be specified to run as a daemon.
public Timer (String name)
  Creates a new timer whose associated thread has the specified name.
public Timer (String name, boolean isDaemon)
  Creates a new timer whose associated thread has the specified name, and may be specified to run as a daemon.
Methods
Hide/Show inherited methods
public void cancel ()
  Terminates this timer, discarding any currently scheduled tasks.
public int purge ()
  Removes all cancelled tasks from this timer's task queue.
public void schedule (TimerTask task, Date time)
  Schedules the specified task for execution at the specified time.
public void schedule (TimerTask task, Date firstTime, long period)
  Schedules the specified task for repeated fixed-delay execution, beginning at the specified time.
public void schedule (TimerTask task, long delay)
  Schedules the specified task for execution after the specified delay.
public void schedule (TimerTask task, long delay, long period)
  Schedules the specified task for repeated fixed-delay execution, beginning after the specified delay.
public void scheduleAtFixedRate (TimerTask task, Date firstTime, long period)
  Schedules the specified task for repeated fixed-rate execution, beginning at the specified time.
public void scheduleAtFixedRate (TimerTask task, long delay, long period)
  Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar