package incr_dom

  1. Overview
  2. Docs
module Incr = Ui_incr
module Effect = Ui_effect
type t

A clock that supports both incremental operations and also alarms.

val create : start:Core.Time_ns.t -> t

Creates a new clock starting at the specified time.

val incr_clock : t -> Incr.Clock.t

Pulls out the Incremental clock within the Bonsai clock. You should avoid this function if possible; if the interface in this module does not have an incremental function you need, then we can add it.

val advance_clock_by : t -> Core.Time_ns.Span.t -> unit

Moves the current time forward by a time span; any alarms are enqueued instead of triggered.

val advance_clock : t -> to_:Core.Time_ns.t -> unit

Moves the current time forward to a specific instant; any alarms are enqueued instead of triggered.

val now : t -> Core.Time_ns.t

The current time.

val watch_now : t -> Core.Time_ns.t Incr.t

An incremental view on the current time.

val at_intervals : t -> Core.Time_ns.Span.t -> unit Incr.t

A unit value that will trigger every specified time span.

An value that switches from Before to After at the specified instant.

val until : t -> Core.Time_ns.t -> unit Effect.t

An effect that waits to complete until the clock reaches the specified instant.

val sleep : t -> Core.Time_ns.Span.t -> unit Effect.t

An effect that waits to complete until the clock advances by the specified time span.

val wait_after_display : t -> unit Effect.t

An effect that waits to complete until the next after_display lifecycle is run.

module Private : sig ... end
OCaml

Innovation. Community. Security.