Up

Module Tsc = Core.Std.Time_stamp_counter

Signature

type t = private Core_kernel.Std.Int63.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val __bin_read_t__ : (int -> t) Core_kernel.Std.Bin_prot.Read.reader
module Calibrator : sig .. end
A calibrator contains a snapshot of machine-specific information that is used to convert between TSC values and clock time.
module Span : sig .. end
Span indicates some integer number of cycles.
external now : unit -> t = "tsc_get" "noalloc"
val diff : t -> t -> Span.t
val add : t -> Span.t -> t
val to_int63 : t -> Core_kernel.Std.Int63.t

to_int63 t returns the TSC value represented by t as an Int63.t.

val to_time : ?calibrator:Calibrator.t -> t -> Core.Time.t

to_time t converts a t to a Time.t. It is guaranteed that repeated calls of to_time () will return nondecreasing Time.t values.

val to_time_ns : ?calibrator:Calibrator.t -> t -> Core_kernel.Std.Time_ns.t

to_time_ns t converts a t to an integer number of nanos since the epoch.