com.custardsource.parfait.TimerScheduler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of parfait-core Show documentation
Show all versions of parfait-core Show documentation
Java performance monitoring framework, including PCP bridge
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);
}
}