-- @Description Automatically Profile the given %Function. Arguments that will be passed to the %Function can be added after ...
-- @Arg1 ProfilerString
-- @Arg2 Function
-- @Arg3 ...

function Debug.Profiler(ProfilerString, Callback, ...)
	debug.profilebegin(ProfilerString)
	local Results = table.pack(Callback(unpack({...} or {})))
	debug.profileend()
	return table.unpack(Results or {})
end


return Debug
