很多java程序员喜欢用Thread.sleep方法来让线程睡眠,来实现定时定时轮询效果。 while (true) { if( check() ) { //执行某个操作} Thread.sleep(10); } ...
確定! 回上一頁