Skip to content

Instantly share code, notes, and snippets.

@orb
Created May 14, 2014 14:29
Show Gist options
  • Save orb/d2075fbdb49e29276c40 to your computer and use it in GitHub Desktop.
Save orb/d2075fbdb49e29276c40 to your computer and use it in GitHub Desktop.
(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))))
@clifton
Copy link

clifton commented May 14, 2014

Awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment