FixedRate.java

import java.util.*;
public class FixedRate {
  public static void main(String[] args) throws InterruptedException {
    Timer timer = new Timer(true);
    // Planifie le marquage des secondes " taux fixe"
    timer.scheduleAtFixedRate(new TickTask(), 0, 1000);
    timer.schedule(new SlowTask(), 3000);
    Thread.sleep(10000);
  }
}