RunLater 주의사항
펑크랜드에서 자주 사용되는 메소드인 RunLater의 주의사항에 대해 알아봅니다.
RunLater 사용
--2초 뒤 Hello, World 출력하기
Client.RunLater(function()
print("Hello, World")
end, 2)시간 간격 보장 문제
-- 1초마다 메시지 출력
local startTime = os.time()
local function printMessage()
local currentTime = os.time()
local elapsedTime = currentTime - startTime
print("경과 시간: " .. elapsedTime .. "초")
end
local function runLaterExample()
Client.RunLater(function()
printMessage()
runLaterExample()
end, 1)
end
runLaterExample()성능 문제
유효성 보장 문제
Last updated