Current Unix time in milliseconds.
Works with Lua 5.1, 5.2, 5.3, 5.4, 5.5, and LuaJIT.
local time = require "mstime"
local ts = time()
local sec = math.floor(ts / 1000)
local ms = ts % 1000
local local_time = string.format("%s.%03d", os.date("%Y-%m-%d %H:%M:%S", sec), ms)
print("Current Time Report")
print("Timestamp ms :", ts)
print("Timestamp s :", sec)
print("Local time :", local_time)luarocks install mstime