aboutsummaryrefslogtreecommitdiffstats
path: root/util/time.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2016-06-28 14:54:43 +0100
committerMatthew Wild <mwild1@gmail.com>2016-06-28 14:54:43 +0100
commitf4fed64125197c6c6ce830fcd7877c69876bfb50 (patch)
tree73fd2c6aa04110f6c834f99d5de79c9510ccaf26 /util/time.lua
parentad4206686a546cb2a7423a4ab62c5d3c9a1ea199 (diff)
parent6fc4ad3aefeab816af4b13df7d877386958a510f (diff)
downloadprosody-f4fed64125197c6c6ce830fcd7877c69876bfb50.tar.gz
prosody-f4fed64125197c6c6ce830fcd7877c69876bfb50.zip
Merge 0.10->trunk
Diffstat (limited to 'util/time.lua')
-rw-r--r--util/time.lua8
1 files changed, 8 insertions, 0 deletions
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;
+}