package posix-time2

  1. Overview
  2. Docs

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.

module Timespec : sig ... end
module Itimerspec : sig ... end
module Timeval : sig ... end
module Tm : sig ... end
module Itimerval : sig ... end
type clock = [
  1. | `Realtime
  2. | `Monotonic
  3. | `Process_cputime
  4. | `Thread_cputime
]
val asctime : Tm.t -> string
val clock_getres : clock -> Timespec.t
val clock_gettime : clock -> Timespec.t
val clock_settime : clock -> Timespec.t -> unit
val ctime : int64 -> string
val gmtime : int64 -> Tm.t
val localtime : int64 -> Tm.t
val mktime : Tm.t -> int64
val nanosleep : Timespec.t -> unit
type itimer = [
  1. | `Real
  2. | `Virtual
  3. | `Prof
]
val getitimer : itimer -> Itimerval.t
val setitimer : itimer -> Itimerval.t -> Itimerval.t
val gettimeofday : unit -> Timeval.t
val 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
val utimes : string -> Timeval.t -> unit
OCaml

Innovation. Community. Security.