package yqw.java.util;

 

public class ThreadUtils {

    /**
     * showThreadInfo
     *
     * @return
     */
    public static final String showThreadInfo() {

        return "^^^^^^^^^^^^^^^^^^^^^^^ currentThread: name=" + Thread.currentThread().getName() + "  , + Thread.currentThread().getPriority();
    }

    /**
     * sleep not catch Exception
     *
     * @param ms
     * @return
     */
    public static boolean sleep(int ms) {
        try {
            Thread.sleep(ms);
            return true;
        } catch (InterruptedException e) {
            return false;
        }
    }
}

相关文章: