Module Time

module Time: sig .. end
POSIX clock and time
Author(s): Markus W. Weissmann

module Clock: sig .. end
The list of known clocks.
module Timespec: sig .. end
Time specifier including seconds tv_sec and nanoseconds tv_nsec.
val clock_getres : Clock.t -> (Timespec.t, [> `EUnix of Unix.error ]) Result.result
clock_getres clock returns the resolution (precision) of the specified clock. If the clock clock is not supported by the operating system, Error is returned.
val clock_gettime : Clock.t -> (Timespec.t, [> `EUnix of Unix.error ]) Result.result
clock_gettime clock retrieves the time of the clock clock. If the clock clock is not supported by the operating system, Error is returned.
val clock_settime : Clock.t ->
Timespec.t -> (unit, [> `EUnix of Unix.error ]) Result.result
clock_settime clock time sets the time of the clock clock to time. If the clock clock is not supported by the operating system, Error is returned.
val nanosleep : Timespec.t ->
(Timespec.t option, [> `EUnix of Unix.error ]) Result.result
nanosleep time lets the system sleep for time. If the call was interrupted by a signal, the Ok return value will bring Some time value carrying the remaining time -- otherwise None.
val clock_nanosleep : Clock.t ->
?abs:bool ->
Timespec.t ->
(Timespec.t option, [> `EUnix of Unix.error ]) Result.result
clock_nanosleep clock time ~abs:a lets the system sleep for time. The duration is based on the clock clock. time either gives a relative time when ~abs is false or an absolute time when ~abs is true. The default case is relative time. The return value is analog to nanosleep.