            ms-period     (long ms-period)]
        (.scheduleAtFixedRate pool fun initial-delay ms-period TimeUnit/MILLISECONDS))))
 
+(defn- stop-and-reset-pool*
+  [pool now?]
+  (let [num-threads (.getCorePoolSize pool)
+        new-pool (make-pool num-threads)]
+    (if now?
+      (.shutdownNow pool)
+      (.shutdown pool))
+
+    new-pool))
+
 (defn stop-and-reset-pool!
-  "Shuts down a given pool (passed in as an atom) either immediately or not depending on whether the optional now param is used.
-   The pool is then reset to a fresh new pool preserving the original size."
-  [pool-ref & [now]]
-  (let [pool @pool-ref
-        num-threads (.getCorePoolSize pool)]
-    (reset! pool-ref (make-pool num-threads))
-    (if now
-      (.shutdownNow pool)
-      (.shutdown pool))))
-  (on-sync-event :reset ::player-reset #(stop-and-reset-pool! player-pool* true ))
+  "Shuts down a given pool (passed in as an agent) either immediately or not depending on whether the optional now param is
+   used. The pool is then reset to a fresh new pool preserving the original size."
+  ([pool-ag] (stop-and-reset-pool! pool-ag false))
+  ([pool-ag now?]
+     (send-off pool-ag stop-and-reset-pool* now?)))
 
+(on-sync-event :reset ::player-reset #(stop-and-reset-pool! player-pool* true ))
 
 (defn stop-player [player & [now]]
   (.cancel player (or now false)))
+
+
+(defn now []
+  (System/currentTimeMillis))
 
 ; Recursion in Time
 ;   By passing a function using #'foo syntax instead of just foo, when later

; it seems that timing isn't accurate enough.

(defn make-pool
  "creates a new pool of threads to schedule new events for. Defaults to 10 threads."
  ([] (make-pool 10))
  ([num-threads]
     (ScheduledThreadPoolExecutor. num-threads)))

(def player-pool* (atom (make-pool)))

(defn now []
  (System/currentTimeMillis))

(defn schedule
  "Schedules fun to be executed after ms-delay milliseconds. Pool defaults to the player-pool."

  overtone.time-utils
  (:import (java.util.concurrent ScheduledThreadPoolExecutor TimeUnit
                                 PriorityBlockingQueue))
  (:use (overtone event util)))

; Time

