package eio

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

Module Time.TimeoutSource

Timeout values.

Sourcetype t

v clock duration is a timeout of duration, as measured by clock. Internally, this is just the tuple (clock, duration).

Sourceval seconds : Mono.t -> float -> t

seconds clock duration is a timeout of duration seconds, as measured by clock.

Sourceval none : t

none is an infinite timeout.

Sourceval run : t -> (unit -> ('a, 'e) result) -> ('a, [> `Timeout ] as 'e) result

run t fn runs fn () but cancels it if it takes longer than allowed by timeout t.

Sourceval run_exn : t -> (unit -> 'a) -> 'a

run_exn t fn runs fn () but cancels it if it takes longer than allowed by timeout t, raising exception Timeout.

Sourceval pp : t Fmt.t

pp formats a timeout as a duration (e.g. "5s"). This is intended for use in error messages and logging and is rounded.

OCaml

Innovation. Community. Security.