riemann.time.controlled
Provides controllable periodic and deferred execution. Calling (advance! delta-in-seconds) moves the clock forward, triggering events that would have occurred, in sequence.
control-time!
(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.
reset-time!
(reset-time! f)
(reset-time!)
Resets the clock and task queue. If a function is given, calls f after resetting the time and task list.
with-controlled-time!
macro
(with-controlled-time! & body)
Like control-time! but for without the fn callback. Again, not threadsafe; bindings take effect globally.