Bonsai.ClockSourceFunctions allowing for the creation of time-dependent computations in a testable way.
The current time, updated at tick_every intervals.
The current time, update as frequently as possible.
Mirrors Incr.Clock.at, which changes from Before to After at the specified time.
val every :
when_to_start_next_effect:
[< `Wait_period_after_previous_effect_starts_blocking
| `Wait_period_after_previous_effect_finishes_blocking
| `Every_multiple_of_period_non_blocking
| `Every_multiple_of_period_blocking ] ->
?trigger_on_activate:bool ->
Core.Time_ns.Span.t ->
unit Effect.t Value.t ->
unit Computation.tAn event passed to every is scheduled on an interval determined by the time-span argument.
when_to_start_next_effect has the following behavior | `Wait_period_after_previous_effect_starts_blocking -> If the previous effect takes longer than period, we wait until it finishes before starting the next effect. | `Wait_period_after_previous_effect_finishes_blocking -> The effect will always be executed period after the previous effect finishes. | `Every_multiple_of_period_non_blocking -> Executes the effect at a regular interval. | `Every_multiple_of_period_blocking -> Same as `Every_multiple_of_second, but skips a beat if the previous effect is still running.
An effect for fetching the current time.
The function in this computation produces an effect that completes after the specified amount of time.
Like sleep, but waits until a specific time, rather than a time relative to now.