local u=require("\046\046\047\115\099\114\105\112\116\095\115\105\103\110\097\108")local C=require("\064\108\117\110\101\047\116\097\115\107")local N=require("\046\046\047\105\109\112\108")local O=u()local M=O.Connections C.spawn(function()local u=os.clock()while true do for N,O in M do C.defer(O,os.clock()-u)u=os.clock()end C.wait()end end)return((N("\082\117\110\083\101\114\118\105\099\101")):rprop("\080\111\115\116\083\105\109\117\108\097\116\105\111\110",O)):rprop("\072\101\097\114\116\098\101\097\116",O)

-- run
-- implements a mock run service for lune

local signal = require("../script_signal")
local task = require("@lune/task")
local impl = require("../impl")

local POST_SIM = signal()
local POST_SIM_CONNECTIONS = POST_SIM.Connections

task.spawn(function()
	local START = os.clock()

	while true do
		for _, f in POST_SIM_CONNECTIONS do
			task.defer(f, os.clock() - START)
			START = os.clock()
		end
		-- do not remove the wait otherwise ur gonna be fired because tests no workey
		task.wait()
	end
end)

return impl("RunService")
	:rprop("PostSimulation", POST_SIM)
	:rprop("Heartbeat", POST_SIM)