摘要: Lua中没有内置的Sleep函数,有4种方法可以实现Sleep函数功能,如下: 方法1 在一个死循环中设置一个跳出条件,但是这样的做法会占用大量CPU资源,强烈不推荐使用. function Sleep(n) local t0 = os.clock() while os.clock() - t0 0 then os.execute("ping -n " .. tonumb... 阅读全文
posted @ 2013-07-26 21:02 Defense_聪 阅读(37109) 评论(0) 推荐(1) 编辑