src/main/java/org/jboss/util/TimerTask.java
public int compareTo(Object other)
   {
      if (other == this) return 0;
      TimerTask t = (TimerTask) other;
      long diff = getNextExecutionTime() - t.getNextExecutionTime();
      return (int) diff;
   }
public int compareTo(Object other)
   {
      if (other == this) return 0;
      TimerTask t = (TimerTask) other;
      long diff = getNextExecutionTime() - t.getNextExecutionTime();
      return (int) diff;
   }
A TimerTask is less than another if it will be scheduled before.
@throws ClassCastException if other is not a TimerTask, according to the Comparable contract