package hardcaml_event_driven_sim

  1. Overview
  2. Docs

Module Simulator.AsyncSource

Async-like wrapper around schedule_call and schedule_on_change.

Sourcemodule Deferred = Mini_async.Deferred
Sourcemodule Ivar = Mini_async.Ivar
Sourceval create_process : (unit -> unit Deferred.t) -> Process.t

Create a process that repeatedly run a given function.

Sourceval delay : int -> unit Deferred.t

delay n returns deferred that will be filled after n time steps.

Sourceval wait_for_change : Signal_id.t -> unit Deferred.t

wait_for_change sig returns deferred that will be filled when sig changes for the first time.

Sourceval wait_forever : unit -> unit Deferred.t
Sourceval forever : (unit -> unit Deferred.t) -> unit Deferred.t

Execute given function in an infinite loop.

Sourceval current_time : unit -> int