Here you can find the source of delayedExit(final int status, final long delay)
public static Timer delayedExit(final int status, final long delay)
//package com.java2s; //License from project: Open Source License import java.util.Timer; import java.util.TimerTask; public class Main { public static Timer delayedExit(final int status, final long delay) { // Start kill timer. If we don't get a key inject or terminate request before 5 mins, kill application Timer timer = new Timer(); timer.schedule(new TimerTask() { public void run() { // Log.d( TAG, "Forcing exit("+status+")!"); System.exit(0);/* w ww . jav a 2 s .c o m*/ } }, delay); return timer; } }