Skip to content

Instantly share code, notes, and snippets.

@mdelaurentis
Created October 19, 2010 19:07
Show Gist options
  • Select an option

  • Save mdelaurentis/634835 to your computer and use it in GitHub Desktop.

Select an option

Save mdelaurentis/634835 to your computer and use it in GitHub Desktop.
(let [total 1000
period 100
progress (lang/make-periodic-invoker
period
#(printf "So far we did %d, we are %3.2f%% complete.\n" % (* 100.0 (/ % 1.0 total))))]
(dotimes [ii total]
;; do some work / processing here
(progress))
(println "I'm all done"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment