Module Async_unix.Require_explicit_time_source

Deprecates functions that use wall-clock time, so that code must be explicit about what time source is used.

Idiomatic usage is:

open! Require_explicit_time_source

or, in an import.ml:

include Require_explicit_time_source
include Async_unix__.Require_explicit_time_source_intf.Require_explicit_time_source

We shadow Time_ns and Scheduler from Async_kernel because the local versions have a different interface.

include module type of sig ... end with module Scheduler := Async_unix__.Require_explicit_time_source_intf.From_kernel.Scheduler with module Time_ns := Async_unix__.Require_explicit_time_source_intf.From_kernel.Time_ns
  • Deprecated [since 2016-02] Use [Time_source]
  • Deprecated [since 2016-02] Use [Time_source]
val every : ?⁠start:unit Async_kernel.Deferred.t ‑> ?⁠stop:unit Async_kernel.Deferred.t ‑> ?⁠continue_on_error:bool ‑> Time_ns.Span.t ‑> (unit ‑> unit) ‑> unit
  • Deprecated [since 2016-02] Use [Time_source]
val with_timeout : Time_ns.Span.t ‑> 'a Async_kernel.Deferred.t ‑> [ `Result of 'a | `Timeout ] Async_kernel.Deferred.t
  • Deprecated [since 2016-02] Use [Time_source]
module Scheduler : sig ... end
module Time : sig ... end
module Time_ns : sig ... end