Diff

util/time.lua @ 7462:ced4e800f42a

Merge 0.10->trunk
author Matthew Wild <mwild1@gmail.com>
date Tue, 28 Jun 2016 14:54:43 +0100
parent 7461:72e48bddf617
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/util/time.lua	Tue Jun 28 14:54:43 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;
+}