sleep for certain milliseconds - Android Android OS

Android examples for Android OS:Thread

Description

sleep for certain milliseconds

Demo Code

/**/*  www.j  a v  a2 s.c  o m*/
 * (c) Winterwell Associates Ltd, used under MIT License. This file is background IP.
 */
//package com.java2s;

public class Main {
    public static void sleep(int msecs) {
        try {
            Thread.sleep(msecs);
        } catch (InterruptedException e) {
            // oh well
        }
    }
}

Related Tutorials