package timedesc

  1. Overview
  2. Docs

Module Timedesc.TimeSource

Sourcetype t
Sourcetype view = private {
  1. hour : int;
  2. minute : int;
  3. second : int;
  4. ns : int;
}
Sourcetype error = [
  1. | `Invalid_hour of int
  2. | `Invalid_minute of int
  3. | `Invalid_second of int
  4. | `Invalid_s_frac of float
  5. | `Invalid_ns of int
]
Sourceexception Error_exn of error

Constructors

Sourceval make : ?ns:int -> ?s_frac:float -> hour:int -> minute:int -> second:int -> unit -> (t, error) result
Sourceval make_exn : ?ns:int -> ?s_frac:float -> hour:int -> minute:int -> second:int -> unit -> t

Comparison

Sourceval equal : t -> t -> bool

Accessors

Sourceval view : t -> view
Sourceval hour : t -> int
Sourceval minute : t -> int
Sourceval second : t -> int
Sourceval ns : t -> int
Sourceval is_leap_second : t -> bool

Conversion

Sourceval to_span : t -> Span.t
Sourceval of_span : Span.t -> t option
OCaml

Innovation. Community. Security.