package to.etc.util;

import java.util.Timer;

/**
 * @author <a href="mailto:jal@etc.to">Frits Jalvingh</a>
 * Created on 25-6-19.
 */
final public class TimerUtil {
	static private final Timer m_timer = new Timer(true);

	private TimerUtil() {
	}

	static public Timer getTimer() {
		return m_timer;
	}
}

@@ -26,23 +26,137 @@
 ort 
-java.util.Timer
+org.eclipse.jdt.annotation.Nullable;%0A%0Aimport java.util.concurrent.Executors;%0Aimport java.util.concurrent.ScheduledExecutorService
 ;%0A%0A/
@@ -274,16 +274,27 @@
 rUtil %7B%0A
+%09@Nullable%0A
 %09static 
@@ -305,95 +305,349 @@
 ate 
-final Timer m_timer = new Timer(true);%0A%0A%09private TimerUtil() %7B%0A%09%7D%0A%0A%09static public Timer
+ScheduledExecutorService m_scheduler;%0A%0A%09private TimerUtil() %7B%0A%09%7D%0A%0A%09static private final ScheduledExecutorService getScheduler() %7B%0A%09%09ScheduledExecutorService scheduler = m_scheduler;%0A%09%09if(null == scheduler) %7B%0A%09%09%09m_scheduler = scheduler = Executors.newScheduledThreadPool(2);%0A%09%09%7D%0A%09%09return scheduler;%0A%09%7D%0A%0A%09static public ScheduledExecutorService
  get
@@ -669,15 +669,22 @@
 urn 
-m_timer
+getScheduler()
 ;%0A%09%7D

replace Timer with ScheduledExecutor because the Timer class cancels itself 8-(