Current Unix time in milliseconds.
Works with Lua 5.1, 5.2, 5.3, 5.4, 5.5, and LuaJIT.
local mstime = require "mstime"
local now_ms = mstime.now()
local sec = math.floor(now_ms / 1000)
local ms = now_ms % 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 :", now_ms)
print("Timestamp s :", sec)
print("Local time :", local_time)luarocks install mstime