aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-04-20 22:19:35 +1000
committerdaurnimator <quae@daurnimator.com>2018-04-20 22:19:35 +1000
commita2e3d512a6a154853065c7dc51f749374aca6d0f (patch)
tree470bcab67730638ee64bf6ab26ce2f7e172b6b31
parent1cd5b00d25478b35deba1329d95a342062c51d4c (diff)
downloadfengari-a2e3d512a6a154853065c7dc51f749374aca6d0f.tar.gz
fengari-a2e3d512a6a154853065c7dc51f749374aca6d0f.tar.bz2
fengari-a2e3d512a6a154853065c7dc51f749374aca6d0f.zip
src/loslib.js: Skip Date creation in os.difftime
-rw-r--r--src/loslib.js2
1 files changed, 1 insertions, 1 deletions
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;
};