package incremental_kernel

  1. Overview
  2. Docs
include module type of struct include Core_kernel.Time_ns end with module Span := Core_kernel.Time_ns.Span
type t = private Core_kernel.Int63.t
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_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (Base.Int.t -> 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 Base.Comparisons.S with type t := t
include Base.Comparisons.Infix with type t := 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
val equal : t -> t -> bool
val compare : t -> t -> int

compare t1 t2 returns 0 if t1 is equal to t2, a negative integer if t1 is less than t2, and a positive integer if t1 is greater than t2.

val min : t -> t -> t
val max : t -> t -> 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 : Base.Unit.t -> t

overflows silently

overflows silently

val diff : t -> t -> Core_kernel.Time_ns.Span.t

overflows silently

val abs_diff : t -> t -> Core_kernel.Time_ns.Span.t

overflows silently

val to_span_since_epoch : t -> Core_kernel.Time_ns.Span.t
val of_span_since_epoch : Core_kernel.Time_ns.Span.t -> t
val to_int63_ns_since_epoch : t -> Core_kernel.Int63.t
val of_int63_ns_since_epoch : Core_kernel.Int63.t -> t
val to_int_ns_since_epoch : t -> Base.Int.t

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

val of_int_ns_since_epoch : Base.Int.t -> t
val next_multiple : ?can_equal_after:Base.Bool.t -> base:t -> after:t -> interval:Core_kernel.Time_ns.Span.t -> Base.Unit.t -> 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:Base.Random.State.t -> Base.Unit.t -> t
module Utc : sig ... end
module Stable : sig ... end
module Span : sig ... end
OCaml

Innovation. Community. Security.