diff options
Diffstat (limited to 'src/unheard/clock.clj')
| -rw-r--r-- | src/unheard/clock.clj | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/unheard/clock.clj b/src/unheard/clock.clj new file mode 100644 index 0000000..4011919 --- /dev/null +++ b/src/unheard/clock.clj @@ -0,0 +1,11 @@ +(ns unheard.clock + (:require [missionary.core :as m])) + +(defn clock + "Returns a tuple of [`>clock` `clock`]. + `clock` is an atom representing the current time. + `>clock` is a signal representing the current time." + [] + (let [clock (atom 0) + >clock (m/signal (m/watch clock))] + [>clock clock])) |
