function Scheduler.Wait(D)assert(OptionalNonNegativeNumber(D))D=math.max(D or.03,0)local R=D while R>0 do R=R-Heartbeat:Wait()end return D-R end

function Scheduler.Wait(Seconds)
	assert(OptionalNonNegativeNumber(Seconds))
	Seconds = math.max(Seconds or 0.03, 0)
	local TimeRemaining = Seconds

	while TimeRemaining > 0 do
		TimeRemaining = TimeRemaining - Heartbeat:Wait()
	end

	return Seconds - TimeRemaining
end
