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
commit5d19b7d42da48ad8fba532642af3cd5eb87798b1 (patch)
tree73fd2c6aa04110f6c834f99d5de79c9510ccaf26 /util/time.lua
parent5d9768626dd51c4d979c4c0878b707a8b3dbc0fa (diff)
parent8afacb5d92d6098f6eb85bbc32aff5632983bd5d (diff)
downloadprosody-5d19b7d42da48ad8fba532642af3cd5eb87798b1.tar.gz
prosody-5d19b7d42da48ad8fba532642af3cd5eb87798b1.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;
+}