package gov.va.med.esr.common.persistent.hibernate;

import java.util.Timer;
import java.util.TimerTask;


/*
 * This class is separated from the JSP page for testing only. Once unit tests
 * are complete, this class should be copied to
 * reapplyDetermineEnrollmentProcessToVeteransIn8eAnd8g.jsp
 */
/**
 * Creates instances of timers
 */
class TimerFactory {

    /**
     * 
     * @param tt
     *            the task to execute
     * @param delay
     *            the time, in ms, to elapse before first execution of the task
     * @param interval
     *            the duration in ms between task executions
     * @return a timer object
     */
    public Timer scheduleTimerTask(TimerTask tt, long delay, long interval) {
        Timer timer = new Timer();
        timer.schedule(tt, delay, interval);
        return timer;
    }
}
