1
0
mirror of https://github.com/kepler155c/opus synced 2025-01-18 19:32:52 +00:00
This commit is contained in:
kepler155c@gmail.com 2019-03-01 11:27:27 -05:00
parent 69e6af2314
commit 1e011c8bbd

View File

@ -27,6 +27,13 @@ function Util.tryTimes(attempts, f, ...)
return unpack(result)
end
function Util.Timer()
local ct = os.clock()
return function()
return os.clock() - ct
end
end
function Util.throttle(fn)
local ts = os.clock()
local timeout = .095