Re: [問題] 請問要怎麼讓程式停一陣子?
※ 引述《PsMonkey (痞子軍團團長)》之銘言:
: 而是你應該寫成
: public void orzSleep(long ms){
Thread.sleep(0);
: long now = System.currentTimeMillis();
: while(System.currentTimeMillis() - now < ms){
: }
: }
: 這樣子可用度才比較高一點...
這樣cpu才不會發燒:)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 163.26.34.105
討論串 (同標題文章)