(schedule-event this ms-from-now fn-to-call)
Schedule an event which should occur at some time in the future (offset from now).
Schedule an event which should occur at some time in the future (offset from now).
(peek-event this)
Returns the first event on the queue
Returns the first event on the queue
(current-time this)
Returns the current time on the simulated clock, in ms
Returns the current time on the simulated clock, in ms
(advance-clock this ms)
Move the clock forward by the specified number of ms, triggering events (even those added by interstitial triggers) in the correct order up to (and including) events that coincide with the final time.
Move the clock forward by the specified number of ms, triggering events (even those added by interstitial triggers) in the correct order up to (and including) events that coincide with the final time.
(make-async-queue)
Build an asynchronous event simulation queue.
Build an asynchronous event simulation queue.
(process-first-event! queue)
Triggers the first event in the queue (runs it), and removes it from the queue.
Triggers the first event in the queue (runs it), and removes it from the queue.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close