package luv

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type timeval = {
  1. sec : int64;
  2. usec : int32;
}
val gettimeofday : unit -> (timeval, Error.t) result

Binds uv_gettimeofday. See gettimeofday(3p).

Requires libuv 1.28.0.

Feature check: Luv.Require.(has gettimeofday)

val hrtime : unit -> Unsigned.uint64

Samples the high-resolution timer.

Binds uv_hrtime. See clock_gettime(3p).

type timespec = {
  1. sec : int64;
  2. nsec : int32;
}
val clock_gettime : [< `Monotonic | `Real_time ] -> (timespec, Error.t) result

Samples one of the high-resolution timers.

Binds uv_clock_gettime. See clock_gettime(3p).

Requires Luv 0.5.13 and libuv 1.45.0.

Feature check: Luv.Require.(has clock_gettime)

val sleep : int -> unit

Suspends the calling thread for at least the given number of milliseconds.

Binds uv_sleep. See sleep(3p).

Requires libuv 1.34.0.

Feature check: Luv.Require.(has sleep)

OCaml

Innovation. Community. Security.