function MaidTaskUtils.delayed(f,S)assert(type(f)=="\110\117\109\098\101\114","\066\097\100 \116\105\109\101")assert(MaidTaskUtils.isValidTask(S),"\066\097\100 \106\111\098")return function()task.delay(f,function()MaidTaskUtils.doTask(S)end)end end return MaidTaskUtils
--[=[
	Executes the task delayed after some time.

	```lua
	-- delays cleanup by 5 seconds
	maid:GiveTask(MaidTaskUtils.delayed(5, gui))
	```

	@param time number -- Time in seconds
	@param job MaidTask -- Job to delay execution
	@return () -> () -- function that will execute the job delayed
]=]
function MaidTaskUtils.delayed(time, job)
	assert(type(time) == "number", "Bad time")
	assert(MaidTaskUtils.isValidTask(job), "Bad job")

	return function()
		task.delay(time, function()
			MaidTaskUtils.doTask(job)
		end)
	end
end

return MaidTaskUtils
