Here you can find the source of exitSystemAfterTimeout(final long delay)
public static void exitSystemAfterTimeout(final long delay)
//package com.java2s; //License from project: Apache License import java.util.Timer; import java.util.TimerTask; public class Main { public static void exitSystemAfterTimeout(final long delay) { new Timer().schedule(new TimerTask() { @Override/*w ww. jav a 2 s . c om*/ public void run() { System.exit(1); } }, delay); } }