(callback state {:keys [clock trigger executor promise] :as opts})
A ticker travels across a timeline, usually triggering some action for each time on the timeline.
A ticker travels across a timeline, usually triggering some action for each time on the timeline.
(clock _)
Return the clock indicating where the ticker is in the timeline.
Return the clock indicating where the ticker is in the timeline.
(pause _)
If supported by the ticker, pause. Can be resumed.
If supported by the ticker, pause. Can be resumed.
(remaining _)
Return the remaining timeline yet to be visited by the ticker.
Return the remaining timeline yet to be visited by the ticker.
(resume _)
Resume a paused ticker.
Resume a paused ticker.
(start _ clock)
Start a ticker. If required, deref the result to block until the schedule is complete.
Start a ticker. If required, deref the result to block until the schedule is complete.
(stop _)
Stop the ticker. Can be restarted with start.
Stop the ticker. Can be restarted with start.
(schedule trigger timeline)
(schedule trigger timeline {:keys [executor]})
Think of this like map, but applying a function over a timeline. Returns a ticker.
Think of this like map, but applying a function over a timeline. Returns a ticker.
(schedule-next next-time {:keys [clock executor callback]})
(simulate trigger timeline)
(simulate trigger timeline {:keys [executor]})
Like schedule, but return a ticker that eagerly advances the clock to the next time in the timeline and serially executes the trigger.
Like schedule, but return a ticker that eagerly advances the clock to the next time in the timeline and serially executes the trigger.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close