module Span:sig..end
typet = privatefloat
module Parts:sig..end
include Comparable_binable
include Floatable
include Hashable_binable
include Pretty_printer.S
include Robustly_comparable
val to_string : t -> stringval of_string : string -> tval nanosecond : tval microsecond : tval millisecond : tval second : tval minute : tval hour : tval day : tval epsilon : tval zero : tval create : ?sign:Float.Sign.t ->
?day:int ->
?hr:int -> ?min:int -> ?sec:int -> ?ms:int -> ?us:int -> unit -> tval to_parts : t -> Parts.tval of_ns : float -> tval of_us : float -> tval of_ms : float -> tval of_sec : float -> tval of_int_sec : int -> tval of_min : float -> tval of_hr : float -> tval of_day : float -> tval to_ns : t -> floatval to_us : t -> floatval to_ms : t -> floatval to_sec : t -> floatval to_min : t -> floatval to_hr : t -> floatval to_day : t -> floatval (+) : t -> t -> tval (-) : t -> t -> tval abs : t -> tval neg : t -> tval scale : t -> float -> tval (/) : t -> float -> tval (//) : t -> t -> floatval to_short_string : t -> stringto_short_string t pretty-prints approximate time span using no more than
five characters if the span is positive, and six if the span is negative.
Examples
"4h" = 4 hours"5m" = 5 minutes"4s" = 4 seconds"10ms" = 10 milliseconds
only the most significant denomination is shown.
val randomize : t -> percent:float -> trandomize t ~percent returns a span +/- percent * original span. Percent must be
between 0 and 1, and must be positive.module Stable:sig..end
val t_of_sexp : Sexplib.Sexp.t -> tval sexp_of_t : t -> Sexplib.Sexp.tval bin_t : t Bin_prot.Type_class.tval bin_read_t : t Bin_prot.Read_ml.readerval bin_read_t_ : t Bin_prot.Unsafe_read_c.readerval bin_read_t__ : (int -> t) Bin_prot.Unsafe_read_c.readerval bin_reader_t : t Bin_prot.Type_class.readerval bin_size_t : t Bin_prot.Size.sizerval bin_write_t : t Bin_prot.Write_ml.writerval bin_write_t_ : t Bin_prot.Unsafe_write_c.writerval bin_writer_t : t Bin_prot.Type_class.writerto_short_string t pretty-prints approximate time span using no more than
five characters if the span is positive, and six if the span is negative.
Examples
"4h" = 4 hours"5m" = 5 minutes"4s" = 4 seconds"10ms" = 10 milliseconds
only the most significant denomination is shown.
randomize t ~percent returns a span +/- percent * original span. Percent must be
between 0 and 1, and must be positive.