libs/time.lua

changeset 440
14071b3a46df
child 471
788d4d91ef6b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libs/time.lua	Sat Nov 14 15:24:01 2020 +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;
+}

mercurial