Provides controllable periodic and deferred execution. Calling (advance! delta-in-seconds) moves the clock forward, triggering events that would have occurred, in sequence.
Provides controllable periodic and deferred execution. Calling (advance! delta-in-seconds) moves the clock forward, triggering events that would have occurred, in sequence.
(advance! t)
Advances the clock to t seconds, triggering side effects.
Advances the clock to t seconds, triggering side effects.
Reference to the current time, in seconds.
Reference to the current time, in seconds.
(control-time! f)
Switches riemann.time functions to time.controlled counterparts, invokes f, then restores them. Definitely not threadsafe. Not safe by any standard, come to think of it. Only for testing purposes.
Switches riemann.time functions to time.controlled counterparts, invokes f, then restores them. Definitely not threadsafe. Not safe by any standard, come to think of it. Only for testing purposes.
(reset-time!)
(reset-time! f)
Resets the clock and task queue. If a function is given, calls f after resetting the time and task list.
Resets the clock and task queue. If a function is given, calls f after resetting the time and task list.
(set-time! t)
Sets the current time, without triggering callbacks.
Sets the current time, without triggering callbacks.
(with-controlled-time! & body)
Like control-time! but for without the fn callback. Again, not threadsafe; bindings take effect globally.
Like control-time! but for without the fn callback. Again, *not* threadsafe; bindings take effect globally.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close