sleep For In Seconds - Android java.lang

Android examples for java.lang:Thread

Description

sleep For In Seconds

Demo Code

import android.util.Log;
import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Main{


    public static void sleepForInSecs(int secs) {
        try {/*from ww  w .  j a va  2 s . c om*/
            Thread.sleep(secs * 1000);
        } catch (InterruptedException x) {
            throw new RuntimeException("interrupted", x);
        }
    }

}

Related Tutorials