# HG changeset patch # User Matthew Wild # Date 1467121784 -3600 # Node ID 72e48bddf6179830f5ef1695ef703e2fdc2c9d87 # Parent 726b088f9408eea3180e1f1862f4c60a0759eed0 util.time: New tiny library to abstract LuaSocket's gettime() function, so we can use other sources in the future diff -r 726b088f9408 -r 72e48bddf617 util/time.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/util/time.lua Tue Jun 28 14:49:44 2016 +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; +}