lua_async.limiting.pool[co] = {
limit = limit,
- next_yield = os.clock() + limit,
+ next_yield = lua_async.clock() + limit,
}
end
local co = assert(coroutine.running(), "check_limit called outside of an async function")
local limit = lua_async.limiting.pool[co]
- if limit and os.clock() >= limit.next_yield then
+ if limit and lua_async.clock() >= limit.next_yield then
lua_async.yield()
- limit.next_yield = os.clock() + limit.limit
+ limit.next_yield = lua_async.clock() + limit.limit
return true
end