Software /
code /
verse
Changeset
440:14071b3a46df
util.time: Add pure Lua version of Prosody C module
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 14 Nov 2020 15:24:01 +0100 |
parents | 439:6fc73ad6b1d2 |
children | 441:e4c0b1d7fd6b |
files | libs/time.lua |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libs/time.lua Sat Nov 14 15:24:01 2020 +0100 @@ -0,0 +1,8 @@ +-- Import gettime() from LuaSocket, as a way to access high-resolution time +-- in a platform-independent way + +local socket_gettime = require "socket".gettime; + +return { + now = socket_gettime; +}