Thread-safe timer Implement a thread-safe timer. Timer is used to execute task(runnable) at specific time.