function Promise.delay(R)assert(type(R)=="\110\117\109\098\101\114","\066\097\100 \097\114\103\117\109\101\110\116 \035\049 \116\111 \080\114\111\109\105\115\101\046\100\101\108\097\121\044 \109\117\115\116 \098\101 \097 \110\117\109\098\101\114\046")local l=Promise._getTime()return Promise._new(debug.traceback(nil,2),function(a)task.delay(R,function()a(Promise._getTime()-l)end)end)end
--[=[
	Returns a Promise that resolves after `seconds` seconds have passed. The Promise resolves with the actual amount of time that was waited.

	This function is a wrapper around `task.delay`.

	:::warning
	Passing NaN, +Infinity, -Infinity, 0, or any other number less than the duration of a Heartbeat will cause the promise to resolve on the very next Heartbeat.
	:::

	```lua
		Promise.delay(5):andThenCall(print, "This prints after 5 seconds")
	```

	@function delay
	@within Promise
	@param seconds number
	@return Promise<number>
]=]
function Promise.delay(seconds)
	assert(type(seconds) == "number", "Bad argument #1 to Promise.delay, must be a number.")
	local startTime = Promise._getTime()
	return Promise._new(debug.traceback(nil, 2), function(resolve)
		task.delay(seconds, function()
			resolve(Promise._getTime() - startTime)
		end)
	end)
end
