Lua 获取毫秒精度时间

-- 设置动态库路径
package.cpath = './luaclib/?.so;'
 
-- 加载socket
local socket = require('socket.core')
 
-- 获取当前毫秒时间
local current = socket.gettime() * 1000
 
print(string.format('current time is %d ',current))

 

socket.tgz  可以自己安装

 

posted on 2020-10-11 08:02  寒魔影  阅读(2685)  评论(0编辑  收藏  举报

导航