Software /
code /
prosody
Comparison
util/time.lua @ 7461:72e48bddf617
util.time: New tiny library to abstract LuaSocket's gettime() function, so we can use other sources in the future
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 28 Jun 2016 14:49:44 +0100 |
comparison
equal
deleted
inserted
replaced
7460:726b088f9408 | 7461:72e48bddf617 |
---|---|
1 -- Import gettime() from LuaSocket, as a way to access high-resolution time | |
2 -- in a platform-independent way | |
3 | |
4 local socket_gettime = require "socket".gettime; | |
5 | |
6 return { | |
7 now = socket_gettime; | |
8 } |