macro | since v0.0-927 | clojure.core/time | Edit |
(time expr)
Evaluates expr and prints the time it took. Returns the value of expr.
(core/defmacro time
[expr]
`(let [start# (system-time)
ret# ~expr]
(prn (cljs.core/str "Elapsed time: "
(.toFixed (- (system-time) start#) 6)
" msecs"))
ret#))