Java tutorial
//package com.java2s; import android.util.Log; public class Main { protected static final String TAG = "CommonUtil"; public static void sleep(int sec) throws Exception { Log.i(TAG, String.format("Sleep %d second(s) forcibly.", sec)); Thread.sleep(sec * 1000); } public static void sleep(double sec) throws Exception { Log.i(TAG, String.format("Sleep %f sceond(s) forcibly", sec)); Thread.sleep((long) (sec * 1000)); } }