A class for scheduling tasks to run at a specified time in future. It demonstrates the use of multi-threading, priority queue and synchronization.
INPUTS:
- A Runnable object that is to be scheduled for delayed run
- A timestamp in future (in milliseconds) when the task is to be run
OUTPUTS:
- No immediate return. The specified task is scheduled.
- The task is executed at (or prtty close to) the specified time.
Possible improvements that can be made:
- Use a thread-pool for running the specified tasks instead of creating a new one everytime.