Page
Library
Module
Module type
Parameter
Class
Class type
Source
Posix_time2SourcePOSIX time and clock functions.
This module provides OCaml bindings to POSIX time functions defined in time.h and sys/time.h.
It includes high-precision time structures, clock access, timers, and time conversion functions.
Interval timer specification using timespec.
type clock = [ | `RealtimeSystem-wide real-time clock
*)| `MonotonicMonotonic clock that cannot be set
*)| `Process_cputimeCPU time consumed by the process
*)| `Thread_cputimeCPU time consumed by the thread
*) ]Clock identifiers for clock_gettime and related functions. See clock_getres(3).
Convert broken-down time to a string. See asctime(3).
Get clock resolution. See clock_getres(3).
Get current time from a clock. See clock_gettime(3).
Set a clock's time (requires appropriate privileges). See clock_settime(3).
Convert Unix timestamp to broken-down local time. See localtime(3).
High-resolution sleep. See nanosleep(3).
High-resolution sleep with clock selection. See clock_nanosleep(3).
type itimer = [ | `RealITIMER_REAL: decrements in real time, delivers SIGALRM
*)| `VirtualITIMER_VIRTUAL: decrements in process virtual time, delivers SIGVTALRM
*)| `ProfITIMER_PROF: decrements in process time, delivers SIGPROF
*) ]Interval timer types for getitimer and setitimer. See getitimer(3).
Get the value of an interval timer. See getitimer(3).
Set an interval timer and return its previous value. See setitimer(3).
Get the current time of day. See gettimeofday(3).
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 listSynchronous I/O multiplexing.
See select(2).