home
/
code
/
khatus.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
941041795d9ebdd7edc48f21216e8f05c169ac97
[khatus.git]
/
x3
/
src
/
lib
/
khatus_time.ml
1
module Span = struct
2
type t = float
3
4
let of_string s =
5
float_of_string s
6
7
let is_gt_or_eq t1 t2 =
8
t1 >= t2
9
end
10
11
type t = float
12
13
let init = 0.0
14
15
let diff t0 t1 =
16
t1 -. t0
17
18
let to_string t =
19
Printf.sprintf "%f" t
20
|> String.split_on_char '.'
21
|> List.hd
22
23
let of_string s =
24
(* TODO: Shall we validate time string format at msg parse time? *)
25
float_of_string s
This page took
0.065737 seconds
and
4
git commands to generate.