package core_unix

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

Opaque representation of C clockid_t.

type t =
  1. | Realtime
  2. | Monotonic
  3. | Process_cpu
  4. | Process_thread
  5. | Custom of underlying

Supported clocks. See clock_gettime(3) man pages for semantics.

val get_cpuclock_for : (Core.Pid.t -> underlying) Core.Or_error.t

See clock_getcpuclockid(3).

val getres : (t -> Core.Int63.t) Core.Or_error.t

Return the resolution of the given clock in nanoseconds.

val gettime : (t -> Core.Int63.t) Core.Or_error.t

Return the current time of the given clock since 00:00:00 UTC, Jan. 1, 1970, in nanoseconds.

OCaml

Innovation. Community. Security.