package posix-time2

  1. Overview
  2. Docs

Module Posix_time2Source

High-level API to <time.h> and <sys/time.h>. See: time.h and systime.h for an explanation about the data structures and functions.

Sourcemodule Timespec : sig ... end
Sourcemodule Itimerspec : sig ... end
Sourcemodule Timeval : sig ... end
Sourcemodule Tm : sig ... end
Sourcemodule Itimerval : sig ... end
Sourcetype clock = [
  1. | `Realtime
  2. | `Monotonic
  3. | `Process_cputime
  4. | `Thread_cputime
]
Sourceval asctime : Tm.t -> string
Sourceval clock_getres : clock -> Timespec.t
Sourceval clock_gettime : clock -> Timespec.t
Sourceval clock_settime : clock -> Timespec.t -> unit
Sourceval ctime : int64 -> string
Sourceval gmtime : int64 -> Tm.t
Sourceval localtime : int64 -> Tm.t
Sourceval mktime : Tm.t -> int64
Sourceval nanosleep : Timespec.t -> unit
Sourceval clock_nanosleep : absolute:bool -> clock:clock -> Timespec.t -> unit
Sourcetype itimer = [
  1. | `Real
  2. | `Virtual
  3. | `Prof
]
Sourceval getitimer : itimer -> Itimerval.t
Sourceval setitimer : itimer -> Itimerval.t -> Itimerval.t
Sourceval gettimeofday : unit -> Timeval.t
Sourceval select : Unix.file_descr list -> Unix.file_descr list -> Unix.file_descr list -> Timeval.t option -> Unix.file_descr list * Unix.file_descr list * Unix.file_descr list
Sourceval utimes : string -> Timeval.t -> unit