Implement task sleep function
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
-- include task functions in the global scope
|
||||
local task = require("lb:task")
|
||||
|
||||
-- include `lb_tasklib::spawn` in the global scope
|
||||
function sleep(ms)
|
||||
return task:sleep(ms)
|
||||
end
|
||||
|
||||
function spawn(f, ...)
|
||||
return task:spawn(f, ...)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user