Kod uruchamiania Java w odstępie czasu
/* Perform this runnable code every 5 seconds in this example*/
Runnable runnable = new Runnable() {
public void run() {
// task to run goes here
System.out.println("Hello !!");
}
};
ScheduledExecutorService service = Executors
.newSingleThreadScheduledExecutor();
service.scheduleAtFixedRate(runnable, 0, 5, TimeUnit.SECONDS);
Kirk-Patrick Brown