|
Java™ by example!
|
|
|
How do I implement a timer thread?
Use java.util.Timer. The following examples registers two tasks, executes one after 10 seconds and another one repeatedly every 2 seconds. Main.java:
outputs:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|