Skip to content

Commit d8c268d

Browse files
Tim-ats-dvoodoos
andauthored
Improve precision of duration field in view-metrics (#1565)
* Improve precision of metrics timestamp. * Add change entry. --------- Co-authored-by: Ulysse <[email protected]>
1 parent b4cf816 commit d8c268d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
- Make `code-lens` for nested let bindings configurable (#1567)
66

7+
## Fixes
8+
9+
- Improve precision of collected metrics timestamps. (#1565)
10+
711
# 1.24.0
812

913
## Features

ocaml-lsp-server/src/document.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ end = struct
156156
let task =
157157
match
158158
Lev_fiber.Thread.task t.thread ~f:(fun () ->
159-
let start = Unix.time () in
159+
let start = Unix.gettimeofday () in
160160
let pipeline = make_pipeline () in
161161
let res = Mpipeline.with_pipeline pipeline (fun () -> f pipeline) in
162-
let stop = Unix.time () in
162+
let stop = Unix.gettimeofday () in
163163
res, start, stop)
164164
with
165165
| Error `Stopped -> assert false

0 commit comments

Comments
 (0)