- Direct Known Subclasses:
public class SimpleTimer2
- extends java.lang.Object
Simple event scheduler - toss an event on the queue and it gets fired at the
appropriate time. The method that is fired however should NOT block (otherwise
they b0rk the timer).
This rewrites the old SimpleTimer to use the java.util.concurrent.ScheduledThreadPoolExecutor.
SimpleTimer has problems with lock contention;
this should work a lot better.
This supports cancelling and arbitrary rescheduling.
If you don't need that, use SimpleScheduler instead.
SimpleTimer is deprecated, use this or SimpleScheduler.
Nested Class Summary
Similar to SimpleTimer.TimedEvent but users must extend instead of implement,
and all schedule and cancel methods are through this class rather than SimpleTimer2.
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
protected SimpleTimer2(java.lang.String name)
public static SimpleTimer2 getInstance()
public void stop()
- Removes the SimpleTimer.
public java.lang.String toString()
toString in class