package bonsai

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Functions allowing for the creation of time-dependent computations in a testable way.

val approx_now : tick_every:Core.Time_ns.Span.t -> Core.Time_ns.t Computation.t

The current time, updated at tick_every intervals.

val now : Core.Time_ns.t Computation.t

The current time, update as frequently as possible.

module Before_or_after : sig ... end
val at : Core.Time_ns.t Value.t -> Before_or_after.t Computation.t

Mirrors Incr.Clock.at, which changes from Before to After at the specified time.

val every : Core.Source_code_position.t -> Core.Time_ns.Span.t -> unit Effect.t Value.t -> unit Computation.t

An event passed to every is scheduled on an interval determined by the time-span argument.

val get_current_time : Core.Time_ns.t Effect.t Computation.t

An effect for fetching the current time.

OCaml

Innovation. Community. Security.