Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getTicksFromSeconds(seconds)
- return seconds / 3600
- end
- ingameTimeA = os.epoch("ingame")
- realTimeA = os.epoch("utc")
- sleep(1)
- ingameTimeB = os.epoch("ingame")
- realTimeB = os.epoch("utc")
- ingameDeltaTime = ingameTimeB - ingameTimeA
- ticksElapsed = getTicksFromSeconds(ingameDeltaTime)
- realDeltaTime = (realTimeB - realTimeA) / 1000
- ticksPerSecond = ticksElapsed / realDeltaTime
- print("The server TPS is " .. tostring(ticksPerSecond))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement