t
is immediate on 64bit boxes and so plays nicely with the GC write barrier.
Unfortunately, private Int63.t
is necessary for the compiler to optimize uses.
include sig ... end
val hash_fold_t : Base.Hash.state ‑> t ‑> Base.Hash.state
val hash : t ‑> Base.Hash.hash_value
val typerep_of_t : t Typerep_lib.Std.Typerep.t
val typename_of_t : t Typerep_lib.Std.Typename.t
val bin_t : t Bin_prot.Type_class.t
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (Core_kernel__.Import.int ‑> t) Bin_prot.Read.reader
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_shape_t : Bin_prot.Shape.t
include Core_kernel__.Import.Comparisons.S with type t := t
include Core_kernel.Comparable.Validate with type t := t
val validate_lbound : min:t Base.Maybe_bound.t ‑> t Base.Validate.check
val validate_ubound : max:t Base.Maybe_bound.t ‑> t Base.Validate.check
val validate_bound : min:t Base.Maybe_bound.t ‑> max:t Base.Maybe_bound.t ‑> t Base.Validate.check
include Core_kernel.Comparable.With_zero with type t := t
val validate_positive : t Base.Validate.check
val validate_non_negative : t Base.Validate.check
val validate_negative : t Base.Validate.check
val validate_non_positive : t Base.Validate.check
val is_positive : t ‑> bool
val is_non_negative : t ‑> bool
val is_negative : t ‑> bool
val is_non_positive : t ‑> bool
val sign : t ‑> Base__.Sign0.t
Returns Neg
, Zero
, or Pos
in a way consistent with the above functions.
val nanosecond : t
val microsecond : t
val millisecond : t
val second : t
val minute : t
val hour : t
val day : t
val of_ns : Core_kernel__.Import.float ‑> t
val of_us : Core_kernel__.Import.float ‑> t
val of_ms : Core_kernel__.Import.float ‑> t
val of_sec : Core_kernel__.Import.float ‑> t
val of_min : Core_kernel__.Import.float ‑> t
val of_hr : Core_kernel__.Import.float ‑> t
val of_day : Core_kernel__.Import.float ‑> t
val to_ns : t ‑> Core_kernel__.Import.float
val to_us : t ‑> Core_kernel__.Import.float
val to_ms : t ‑> Core_kernel__.Import.float
val to_sec : t ‑> Core_kernel__.Import.float
val to_min : t ‑> Core_kernel__.Import.float
val to_hr : t ‑> Core_kernel__.Import.float
val to_day : t ‑> Core_kernel__.Import.float
val of_sec_with_microsecond_precision : Core_kernel__.Import.float ‑> t
val of_int_us : Core_kernel__.Import.int ‑> t
val of_int_ms : Core_kernel__.Import.int ‑> t
val of_int_sec : Core_kernel__.Import.int ‑> t
val to_int_us : t ‑> Core_kernel__.Import.int
val to_int_ms : t ‑> Core_kernel__.Import.int
val to_int_sec : t ‑> Core_kernel__.Import.int
val zero : t
val min_value : t
The limits of t
are chosen to allow conversion to and from float
spans with
microsecond precision. This property supports Core.Timing_wheel_float in
particular. See also Core.Time.
val max_value : t
val scale : t ‑> Core_kernel__.Import.float ‑> t
val div : t ‑> t ‑> Core_kernel.Int63.t
val (/) : t ‑> Core_kernel__.Import.float ‑> t
val (//) : t ‑> t ‑> Core_kernel__.Import.float
val create : ?sign:Core_kernel.Sign.t ‑> ?day:Core_kernel__.Import.int ‑> ?hr:Core_kernel__.Import.int ‑> ?min:Core_kernel__.Import.int ‑> ?sec:Core_kernel__.Import.int ‑> ?ms:Core_kernel__.Import.int ‑> ?us:Core_kernel__.Import.int ‑> ?ns:Core_kernel__.Import.int ‑> Core_kernel__.Import.unit ‑> t
Overflows silently.
val to_unit_of_time : t ‑> Core_kernel.Unit_of_time.t
val of_unit_of_time : Core_kernel.Unit_of_time.t ‑> t
val to_int_ns : t ‑> Core_kernel__.Import.int
Will raise on 32-bit platforms. Consider to_int63_ns
instead.
val of_int_ns : Core_kernel__.Import.int ‑> t
val to_proportional_float : t ‑> Core_kernel__.Import.float
The only condition to_proportional_float
is supposed to satisfy is that for all
t1, t2 : t
: to_proportional_float t1 /. to_proportional_float t2 = t1 // t2
.
val since_unix_epoch : Core_kernel__.Import.unit ‑> t
val random : ?state:Core_kernel__.Import.Random.State.t ‑> Core_kernel__.Import.unit ‑> t
module Alternate_sexp : sig ... end
Note that we expose a sexp format that is not the one exposed in Core
.