sig
external clock_rt_getres : unit -> int = "tsc_clock_rt_getres" "noalloc"
external clock_mono_getres : unit -> int = "tsc_clock_mono_getres"
"noalloc"
external clock_rt_gettime : unit -> int = "tsc_clock_rt_gettime" "noalloc"
external clock_mono_gettime : unit -> int = "tsc_clock_mono_gettime"
"noalloc"
module Cycles :
sig
type t = Time_stamp_counter.Cycles.t
type snapshot = Time_stamp_counter.Cycles.snapshot
external now : unit -> t = "tsc_rdtsc" "noalloc"
val add : t -> t -> t
val diff : t -> t -> t
val to_cycle_count : t -> int
val of_int : int -> t
val get_snapshot : unit -> snapshot
val cpu_mhz : ?snapshot:snapshot -> unit -> float
val to_ns : ?snapshot:snapshot -> t -> int
val to_time : ?snapshot:snapshot -> t -> Core.Std.Time.t
val calibrate_snapshot : snapshot -> snapshot
val recalibrate : unit -> unit
val bin_t : t Core.Std.Bin_prot.Type_class.t
val bin_read_t : t Core.Std.Bin_prot.Read_ml.reader
val bin_read_t_ : t Core.Std.Bin_prot.Unsafe_read_c.reader
val bin_read_t__ : (int -> t) Core.Std.Bin_prot.Unsafe_read_c.reader
val bin_reader_t : t Core.Std.Bin_prot.Type_class.reader
val bin_size_t : t Core.Std.Bin_prot.Size.sizer
val bin_write_t : t Core.Std.Bin_prot.Write_ml.writer
val bin_write_t_ : t Core.Std.Bin_prot.Unsafe_write_c.writer
val bin_writer_t : t Core.Std.Bin_prot.Type_class.writer
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_snapshot : snapshot Core.Std.Bin_prot.Type_class.t
val bin_read_snapshot : snapshot Core.Std.Bin_prot.Read_ml.reader
val bin_read_snapshot_ :
snapshot Core.Std.Bin_prot.Unsafe_read_c.reader
val bin_read_snapshot__ :
(int -> snapshot) Core.Std.Bin_prot.Unsafe_read_c.reader
val bin_reader_snapshot : snapshot Core.Std.Bin_prot.Type_class.reader
val bin_size_snapshot : snapshot Core.Std.Bin_prot.Size.sizer
val bin_write_snapshot : snapshot Core.Std.Bin_prot.Write_ml.writer
val bin_write_snapshot_ :
snapshot Core.Std.Bin_prot.Unsafe_write_c.writer
val bin_writer_snapshot : snapshot Core.Std.Bin_prot.Type_class.writer
val snapshot_of_sexp : Sexplib.Sexp.t -> snapshot
val sexp_of_snapshot : snapshot -> Sexplib.Sexp.t
end
end