Skip to content

Instantly share code, notes, and snippets.

@sorribas
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sorribas/561718809d24eb86e77a to your computer and use it in GitHub Desktop.
Save sorribas/561718809d24eb86e77a to your computer and use it in GitHub Desktop.
(defmacro timeperiod [& x]
(cond (= (first (rest x)) 'minutes) (list * (first x) 60000)
(= (first (rest x)) 'seconds) (list * (first x) 1000)
(= (first (rest x)) 'hours) (list * (first x) 3600000)
:else 0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment