Module type Core_kernel__.Time_ns_intf.Time_ns

Time represented as an Int63.t number of nanoseconds since the epoch.

See Core.Time_ns for important user documentation.

Internally, arithmetic is not overflow-checked. Instead, overflows are silently ignored, as for int arithmetic. Conversions may (or may not) raise if prior arithmetic operations overflowed.

module Span : Span
type t = private Core_kernel__.Std_internal.Int63.t
include sig ... end
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
val typerep_of_t : t Typerep_lib.Std.Typerep.t
val typename_of_t : t Typerep_lib.Std.Typename.t
val compare : t ‑> t ‑> Core_kernel__.Import.int
include Core_kernel.Comparable.Infix with type t := t
type t
val (>=) : t ‑> t ‑> bool
val (<=) : t ‑> t ‑> bool
val (=) : t ‑> t ‑> bool
val (>) : t ‑> t ‑> bool
val (<) : t ‑> t ‑> bool
val (<>) : t ‑> t ‑> bool
include Core_kernel__.Import.Equal.S with type t := t
type t
module Alternate_sexp : sig ... end

Note that we expose a sexp format that is not the one exposed in Core.

val epoch : t

Unix epoch (1970-01-01 00:00:00 UTC)

val min_value : t
val max_value : t
val now : Core_kernel__.Import.unit ‑> t
val add : t ‑> Span.t ‑> t

overflows silently

val sub : t ‑> Span.t ‑> t

overflows silently

val diff : t ‑> t ‑> Span.t

overflows silently

val abs_diff : t ‑> t ‑> Span.t

overflows silently

val max : t ‑> t ‑> t
val to_span_since_epoch : t ‑> Span.t
val of_span_since_epoch : Span.t ‑> t
val to_int63_ns_since_epoch : t ‑> Core_kernel__.Std_internal.Int63.t
val of_int63_ns_since_epoch : Core_kernel__.Std_internal.Int63.t ‑> t
val to_int_ns_since_epoch : t ‑> Core_kernel__.Import.int

Will raise on 32-bit platforms. Consider to_int63_ns_since_epoch instead.

val of_int_ns_since_epoch : Core_kernel__.Import.int ‑> t
val next_multiple : ?can_equal_after:Core_kernel__.Import.bool ‑> base:t ‑> after:t ‑> interval:Span.t ‑> Core_kernel__.Import.unit ‑> t

next_multiple ~base ~after ~interval returns the smallest time of the form:


        time = base + k * interval
      

where k >= 0 and time > after. It is an error if interval <= 0.

Supplying ~can_equal_after:true allows the result to satisfy time >= after.

Overflows silently.

val random : ?state:Core_kernel__.Std_internal.Random.State.t ‑> Core_kernel__.Import.unit ‑> t
module Utc : sig ... end
module Stable : sig ... end