RobustTimer.java

import java.util.*;
public class RobustTimer {
  public static void main(String[] args) throws InterruptedException {
    Timer timer = new Timer(true);
    timer.schedule(new TickTask(), 0, 1000);
    timer.schedule(new RiskyTask(), 0, 1000);
    Thread.sleep(5000);
  }
}