Java tutorial
//package com.java2s; import android.content.Context; public class Main { public static void waitForMillis(final int millis, Context context) { Thread thread = new Thread() { @Override public void run() { try { synchronized (this) { wait(millis); } } catch (InterruptedException ex) { } // TODO } }; thread.start(); } }