From a2e3d512a6a154853065c7dc51f749374aca6d0f Mon Sep 17 00:00:00 2001
From: daurnimator <quae@daurnimator.com>
Date: Fri, 20 Apr 2018 22:19:35 +1000
Subject: src/loslib.js: Skip Date creation in os.difftime

---
 src/loslib.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src')

diff --git a/src/loslib.js b/src/loslib.js
index 66bcb18..6419524 100644
--- a/src/loslib.js
+++ b/src/loslib.js
@@ -199,7 +199,7 @@ const l_checktime = function(L, arg) {
 const os_difftime = function(L) {
     let t1 = l_checktime(L, 1);
     let t2 = l_checktime(L, 2);
-    lua_pushnumber(L, new Date(t1) - new Date(t2));
+    lua_pushnumber(L, t1 - t2);
     return 1;
 };
 
-- 
cgit v1.2.3-70-g09d2