2019独角兽企业重金招聘Python工程师标准>>> while(true){ Thread.sleep(1000); } 比timer好,因为timer是单线程,跑久以后就会出现线程死掉的情况 转载于:https://my.oschina.net/u/2299924/blog/1813662