Support prelude/time

Write macro that wraps Elisp's builtin `benchmark` function. I'm doing this
because `prelude/time` more closely resembles the API that I would expect.
This commit is contained in:
William Carroll 2020-01-15 19:54:32 +00:00
parent df4eed20f4
commit d45debc8e5

View file

@ -133,5 +133,9 @@ This is a wrapper around `start-process' that has an API that resembles
(f-exists? file)
nil)))
(defmacro prelude/time (x)
"Print the time it takes to evaluate X."
`(benchmark 1 ',x))
(provide 'prelude)
;;; prelude.el ends here