diff options
author | William Carroll <wpcarro@gmail.com> | 2020-01-15T19·54+0000 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-01-17T10·56+0000 |
commit | d45debc8e5905fa7f4d94d7c27ee510b2901567e (patch) | |
tree | 48b49dcb23be2860f3669f2e713e9bdcffc8e6b3 | |
parent | df4eed20f4c0ff3a96702448b021f263891a3ea5 (diff) |
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.
-rw-r--r-- | configs/shared/.emacs.d/wpc/prelude.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/configs/shared/.emacs.d/wpc/prelude.el b/configs/shared/.emacs.d/wpc/prelude.el index c1579d558985..8bc2f283c7cf 100644 --- a/configs/shared/.emacs.d/wpc/prelude.el +++ b/configs/shared/.emacs.d/wpc/prelude.el @@ -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 |