Skip to content

Instantly share code, notes, and snippets.

@ztellman
Created August 20, 2014 23:03
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 ztellman/741ee67f121fdfb7083c to your computer and use it in GitHub Desktop.
Save ztellman/741ee67f121fdfb7083c to your computer and use it in GitHub Desktop.
(future
(loop [next-update (+ (System/currentTimeMillis) 1e3)]
(with-open [w (io/writer path)]
(.write w (str (.time ^PartialFlake @f))))
;; sleep for a second before writing the next timestamp
(Thread/sleep (- next-update (System/currentTimeMillis)))
(recur (+ next-update 1e3))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment