local format = "%s"
format = string.gsub(format, " ", "%%20")
sleepTime = 30

print("Calculating TPS")
print("Ingame sleeptime is: " .. sleepTime)

local handle = http.get("http://oddstr13.openshell.no/gettime.py?format=" .. format)
local timeStart = handle.readLine()
handle.close()

sleep(sleepTime)

local handle = http.get("http://oddstr13.openshell.no/gettime.py?format=" .. format)
local timeEnd = handle.readLine()
handle.close()

print("TPS is:")
print(sleepTime / (timeEnd - timeStart) * 20)
