678910111213141516
public class TimerWheelExample { public void test() { final HashTimeWheel t = new HashTimeWheel(); t.setMaxTimers(5); t.setInterval(100); t.start(); try { Thread.sleep(130L); } catch (InterruptedException e) { e.printStackTrace();
6768697071727374757677
public static void main(String[] args) { final HashTimeWheel t = new HashTimeWheel(); t.setMaxTimers(5); t.setInterval(100); t.start(); HashTimeWheel.Future future = t.add(3000, new Runnable(){ @Override public void run() {