aboutsummaryrefslogtreecommitdiff
path: root/js/core.js
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-04-17 21:49:07 -0500
committerJoel Martin <github@martintribe.org>2014-04-17 21:49:07 -0500
commitdb4c329aff4621e05b92a55be4f18173f5a4f655 (patch)
tree92baaa6d88246e509cfd6a7d03d8fab997e0b935 /js/core.js
parent8cb5cda46cf3aef847ae3926dc53a5e5f87fe261 (diff)
downloadmal-db4c329aff4621e05b92a55be4f18173f5a4f655.tar.gz
mal-db4c329aff4621e05b92a55be4f18173f5a4f655.zip
All: perf test, Makefile refactor, add *host-language*
Other: - bash,make,postscript: quasiquote of vectors - Fix Java slurp - add time function to core.mal - switches on *host-language* for make time-secs vs time-ms - Ignore */experiments directories
Diffstat (limited to 'js/core.js')
-rw-r--r--js/core.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/js/core.js b/js/core.js
index d5c014f..f9e478e 100644
--- a/js/core.js
+++ b/js/core.js
@@ -43,6 +43,10 @@ function slurp(f) {
}
+// Number functions
+function time_ms() { return new Date().getTime(); }
+
+
// Hash Map functions
function assoc(src_hm) {
var hm = types._clone(src_hm);
@@ -166,6 +170,7 @@ var ns = {'type': types._obj_type,
'-' : function(a,b){return a-b;},
'*' : function(a,b){return a*b;},
'/' : function(a,b){return a/b;},
+ "time-ms": time_ms,
'list': types._list,
'list?': types._list_Q,