Skip to content
Snippets Groups Projects
Commit e9a540d6 authored by Cam Saül's avatar Cam Saül
Browse files

Fix formatting of minutes for format-nanoseconds :ghost:

parent 171b61f8
No related branches found
No related tags found
No related merge requests found
......@@ -238,7 +238,7 @@
"Format a time interval in nanoseconds to something more readable (µs/ms/etc.)
Useful for logging elapsed time when using `(System/nanotime)`"
[nanoseconds]
(loop [n nanoseconds, [[unit divisor] & more] [[:ns 1000] [s 1000] [:ms 1000] [:s 1000] [:mins 60] [:hours 60]]]
(loop [n nanoseconds, [[unit divisor] & more] [[:ns 1000] [s 1000] [:ms 1000] [:s 60] [:mins 60] [:hours Integer/MAX_VALUE]]]
(if (and (> n divisor)
(seq more))
(recur (/ n divisor) more)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment