设置等待时间

public void wait(int seconds){  //设置等待时间
        try {
            Thread.sleep(seconds * 1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
可以直接被调用,eg:wait(2);

 

posted @ 2017-03-21 20:29  六个明天以后  阅读(122)  评论(0编辑  收藏  举报