Created
May 14, 2014 14:29
-
-
Save orb/d2075fbdb49e29276c40 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn find-timer [timer-name] | |
(timers/timer ["APPNAME" "timer" (name timer-name)])) | |
(defmacro with-timer [timer-name & body] | |
`(let [timer# (find-timer ~timer-name)] | |
(timers/time! timer# | |
(do ~@body)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment