Class TaskScheduler

java.lang.Object
org.omegazero.common.event.TaskScheduler

public class TaskScheduler extends Object
Provides functions for time-based scheduling, running functions either once or periodically, similar to JavaScript's setTimeout and setInterval.

Tasks are run in a separate background thread. Multiple tasks may run concurrently. This implementation uses a TaskQueueExecutor.

Timing may be inaccurate, depending on the platform. The implementation uses Object.wait(long).

This class is thread-safe.

Since:
2.1