 (declare execute! schedule*)
 
 (defn- tick!
-  "This function is ran periodically, and at each tick it executes
-   events for which `currentTime` is included in their tolerance interval."
-  [clock]
-  (let [{:keys [events]} @clock
+  "This function is run constantly, and at each tick it executes events for
+   which `currentTime` is included in their tolerance interval."
+  [clock-atom]
+  (let [{:keys [events] :as clock} @clock-atom
         current-time (current-time clock)
         execute-now? #(<= (:earliest-time %) current-time)
-        now (take-while execute-now? events)]
-    (doseq [event now] (execute! event))
-    (swap! clock assoc :events (drop-while execute-now? (:events @clock))
-                       :current-time current-time)))
+        events-due   (take-while execute-now? events)]
+    (doseq [event events-due] (execute! event))
+    (when (seq events-due)
+      (swap! clock-atom update :events #(drop-while execute-now? %)))))
 
 (defn- index-by-time
   "Does a binary search to find the index of the first event whose deadline is


(defn current-time
  "Returns the current time of a clock's audio context, in milliseconds."
  [clock]
  (current-time* @clock))

(defn- absolute-time
  "Converts from relative -> absolute time."
  [clock rel-time]
  (+ rel-time (current-time* clock)))

(defn- relative-time
  "Converts from absolute -> relative time."
  [clock abs-time]
  (- abs-time (current-time* clock)))

(defn- event*
  "Constructor for an event. Requires `action`, `clock` (as an atom) and

   event's clock."
  ([e ratio]
   (let [{:keys [clock-id]} (if (sequential? e) (first e) e)
         clock @(get *clocks* clock-id)]
     (time-stretch! e (current-time clock) ratio)))
  ([e time-reference ratio]
   (if (sequential? e)
