module Period: sig
.. end
A period is the number of seconds between two times.
Arithmetic operations
include Period.S
val length : Time_sig.S.t -> Time_sig.S.second
Number of seconds of a period.
val mul : Time_sig.S.t -> Time_sig.S.t -> Time_sig.S.t
Multiplication.
val div : Time_sig.S.t -> Time_sig.S.t -> Time_sig.S.t
Division.
Constructors
val make : int -> int -> Time_sig.S.second -> Time_sig.S.t
make hour minute second
makes a period of the specified length.
val lmake : ?hour:int -> ?minute:int -> ?second:Time_sig.S.second -> unit -> Time_sig.S.t
Labelled version of make
.
The default value is 0
for each argument.
val hour : int -> Time_sig.S.t
hour n
makes a period of n
hours.
val minute : int -> Time_sig.S.t
minute n
makes a period of n
minutes.
val second : Time_sig.S.second -> Time_sig.S.t
second n
makes a period of n
seconds.
Getters
val to_seconds : Time_sig.S.t -> Time_sig.S.second
Number of seconds of a period.
Since 1.04
val to_minutes : Time_sig.S.t -> float
Number of minutes of a period. The resulting fractional part
represents seconds.
Since 1.04
val to_hours : Time_sig.S.t -> float
Number of hours of a period. The resulting fractional part represents
minutes and seconds.
Since 1.04