mirror of
https://github.com/kepler155c/opus
synced 2025-09-01 18:38:04 +00:00
refactor
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user