From: Matthew Wild Date: Tue, 28 Jun 2016 13:49:44 +0000 (+0100) Subject: util.time: New tiny library to abstract LuaSocket's gettime() function, so we can... X-Git-Url: https://git.enpas.org/?p=prosody.git;a=commitdiff_plain;h=8806da0d002f1ad9a3faa9a16a3729d9c7442de1 util.time: New tiny library to abstract LuaSocket's gettime() function, so we can use other sources in the future --- diff --git a/util/time.lua b/util/time.lua new file mode 100644 index 00000000..84cff877 --- /dev/null +++ b/util/time.lua @@ -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; +}