Module Luv.Time
type t
=
{
tv_sec : int64;
tv_usec : int32;
}
Binds
uv_timeval64_t
.
val gettimeofday : unit -> (t, Error.t) Result.result
Binds
uv_gettimeofday
. Seegettimeofday(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
. Seeclock_gettime(3p)
.
val sleep : int -> unit
Suspends the calling thread for at least the given number of milliseconds.
Binds
uv_sleep
. Seesleep(3p)
.Requires libuv 1.34.0.
Feature check:
Luv.Require.(has sleep)