All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.custardsource.parfait.TimerScheduler Maven / Gradle / Ivy

The newest version!
package com.custardsource.parfait;

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

public class TimerScheduler implements Scheduler {
	private final Timer timer;

	public TimerScheduler(Timer timer) {
		this.timer = timer;
	}

	@Override
	public void schedule(TimerTask task, long rate) {
		schedule(task, rate, rate);

	}

	@Override
	public void schedule(TimerTask timerTask, long delay, long rate) {
		timer.scheduleAtFixedRate(timerTask, delay, rate);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy