org.jclarion.clarion.runtime.ClarionTaskManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clarion-runtime Show documentation
Show all versions of clarion-runtime Show documentation
JClarion runtime environment
The newest version!
package org.jclarion.clarion.runtime;
import java.util.Timer;
public class ClarionTaskManager
{
private static ClarionTaskManager instance;
public static ClarionTaskManager getInstance()
{
if (instance==null) {
synchronized(ClarionTaskManager.class) {
if (instance==null) {
instance=new ClarionTaskManager();
}
}
}
return instance;
}
private Timer timer;
public ClarionTaskManager()
{
timer=new Timer(true);
CRun.addShutdownHook(new Runnable() {
@Override
public void run() {
instance=null;
timer.cancel();
}
});
}
public Timer getTimer()
{
return timer;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy