Lua - Current time in milliseconds
snippet in lua

Lua - Current time in milliseconds

user4035

require "socket"
print("Milliseconds: " .. socket.gettime()*1000)

Lua - Current time in milliseconds

user7417

local x = os.clock()
local s = 0
for i=1,100000 do s = s + i end
print(string.format("elapsed time: %.2f\n", os.clock() - x))