1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-14 23:37:40 +00:00

builder tweaks

This commit is contained in:
kepler155c@gmail.com
2017-05-16 15:58:32 -04:00
parent 87aed4dc01
commit 7438252fb4
2 changed files with 3 additions and 2 deletions

View File

@@ -22,10 +22,10 @@ function Util.tryTimes(attempts, f, ...)
end
function Util.throttle(fn)
local ts = os.time()
local ts = os.clock()
local timeout = .095
return function(...)
local nts = os.time()
local nts = os.clock()
if nts > ts + timeout then
ts = nts
os.sleep(0)