diff options
| author | Joel Martin <github@martintribe.org> | 2014-04-17 21:49:07 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2014-04-17 21:49:07 -0500 |
| commit | db4c329aff4621e05b92a55be4f18173f5a4f655 (patch) | |
| tree | 92baaa6d88246e509cfd6a7d03d8fab997e0b935 /core.mal | |
| parent | 8cb5cda46cf3aef847ae3926dc53a5e5f87fe261 (diff) | |
| download | mal-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 'core.mal')
| -rw-r--r-- | core.mal | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -81,3 +81,19 @@ `(~(first form) ~@(rest form) ~x) (list form x)) `(->> (->> ~x ~form) ~@more)))))) + +(if (= "make" *host-language*) + (defmacro! time + (fn* (exp) + `(let* [start_FIXME (time-secs) + ret_FIXME ~exp] + (do + (prn (str "Elapsed time: " (- (time-secs) start_FIXME) "000 msecs")) + ret_FIXME)))) + (defmacro! time + (fn* (exp) + `(let* [start_FIXME (time-ms) + ret_FIXME ~exp] + (do + (prn (str "Elapsed time: " (- (time-ms) start_FIXME) " msecs")) + ret_FIXME))))) |
