       (do
         (swap! state assoc
                :timeline next-timeline
-               :scheduled-future (schedule-next clock (first next-timeline) executor #(callback state next-timeline clock trigger executor promise)))
+               :scheduled-future (schedule-next (first next-timeline)
+                                                {:clock clock
+                                                 :executor executor
+                                                 :callback #(callback state next-timeline opts)}))
         (dorun (map trigger due)))
 
       ;; Set status to :done

  ([colls]
   (merge-timelines compare colls)))

(defn schedule-next [clock next-time executor cb]
  (when next-time
    (let [dly (.until (.instant clock) next-time ChronoUnit/MILLIS)]
      (.schedule executor ^Callable cb dly TimeUnit/MILLISECONDS))))

(defn callback [state timeline clock trigger executor promise]
  (let [[due next-timeline] (split-with #(not (.isAfter (.toInstant %) (.instant clock))) timeline)]

    (if-not (empty? next-timeline)

              clock (:clock st)]
          (swap! state (fn [st] (-> st (assoc :status :running
                                              :scheduled-future (schedule-next
                                                                 (first timeline)
                                                                 {:clock clock
                                                                  :executor executor
                                                                  :callback #(callback state timeline {:clock clock :trigger trigger :executor executor :promise promise})}))))))

        :ok)))

  (stop [_]
