ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/Timer.java
(Generate patch)

Comparing jsr166/src/main/java/util/Timer.java (file contents):
Revision 1.2 by jsr166, Wed Feb 18 03:47:33 2004 UTC vs.
Revision 1.3 by jsr166, Wed Apr 14 01:30:40 2004 UTC

# Line 28 | Line 28 | import java.util.concurrent.atomic.Atomi
28   * default, the task execution thread does not run as a <i>daemon thread</i>,
29   * so it is capable of keeping an application from terminating.  If a caller
30   * wants to terminate a timer's task execution thread rapidly, the caller
31 < * should invoke the the timer's <tt>cancel</tt> method.
31 > * should invoke the timer's <tt>cancel</tt> method.
32   *
33   * <p>If the timer's task execution thread terminates unexpectedly, for
34   * example, because its <tt>stop</tt> method is invoked, any further
# Line 390 | Line 390 | public class Timer {
390       * <p>Fixed-rate execution is appropriate for recurring activities that
391       * are sensitive to <i>absolute</i> time, such as ringing a chime every
392       * hour on the hour, or running scheduled maintenance every day at a
393 <     * particular time.  It is also appropriate for for recurring activities
393 >     * particular time.  It is also appropriate for recurring activities
394       * where the total time to perform a fixed number of executions is
395       * important, such as a countdown timer that ticks once every second for
396       * ten seconds.  Finally, fixed-rate execution is appropriate for
# Line 433 | Line 433 | public class Timer {
433       * <p>Fixed-rate execution is appropriate for recurring activities that
434       * are sensitive to <i>absolute</i> time, such as ringing a chime every
435       * hour on the hour, or running scheduled maintenance every day at a
436 <     * particular time.  It is also appropriate for for recurring activities
436 >     * particular time.  It is also appropriate for recurring activities
437       * where the total time to perform a fixed number of executions is
438       * important, such as a countdown timer that ticks once every second for
439       * ten seconds.  Finally, fixed-rate execution is appropriate for
# Line 525 | Line 525 | public class Timer {
525       *
526       * <p>Most programs will have no need to call this method.
527       * It is designed for use by the rare application that cancels a large
528 <     * number of of tasks.  Calling this method trades time for space: the
528 >     * number of tasks.  Calling this method trades time for space: the
529       * runtime of the method may be proportional to n + c log n, where n
530       * is the number of tasks in the queue and c is the number of cancelled
531       * tasks.
# Line 648 | Line 648 | class TimerThread extends Thread {
648   * ordered on nextExecutionTime.  Each Timer object has one of these, which it
649   * shares with its TimerThread.  Internally this class uses a heap, which
650   * offers log(n) performance for the add, removeMin and rescheduleMin
651 < * operations, and constant time performance for the the getMin operation.
651 > * operations, and constant time performance for the getMin operation.
652   */
653   class TaskQueue {
654      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines