You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Continuing from #6208
The conflict resolution can be reviewed with:
`git log --remerge-diff -1 8b8af63`
```diff
diff --git a/ocaml/libs/xapi-stdext/lib/xapi-stdext-threads/scheduler.ml b/ocaml/libs/xapi-stdext/lib/xapi-stdext-threads/scheduler.ml
remerge CONFLICT (content): Merge conflict in ocaml/libs/xapi-stdext/lib/xapi-stdext-threads/scheduler.ml
index 7bace30dae..27cf306 100644
--- a/ocaml/libs/xapi-stdext/lib/xapi-stdext-threads/scheduler.ml
+++ b/ocaml/libs/xapi-stdext/lib/xapi-stdext-threads/scheduler.ml
@@ -33,49 +33,8 @@ let (queue : t Ipq.t) = Ipq.create 50 queue_default
let lock = Mutex.create ()
-<<<<<<< 6589d9a (Xapi thread classification - part 2 (#6154))
let add_to_queue_span name ty start_span newfunc =
let ( ++ ) = Mtime.Span.add in
-||||||| 4f3f08f
-module Clock = struct
- let span s = Mtime.Span.of_uint64_ns (Int64.of_float (s *. 1e9))
-
- let span_to_s span =
- Mtime.Span.to_uint64_ns span |> Int64.to_float |> fun ns -> ns /. 1e9
-
- let add_span clock secs =
- (* return mix or max available value if the add overflows *)
- match Mtime.add_span clock (span secs) with
- | Some t ->
- t
- | None when secs > 0. ->
- Mtime.max_stamp
- | None ->
- Mtime.min_stamp
-end
-
-let add_to_queue name ty start newfunc =
- let ( ++ ) = Clock.add_span in
-=======
-module Clock = struct
- let span s = Mtime.Span.of_uint64_ns (Int64.of_float (s *. 1e9))
-
- let span_to_s span = Mtime.Span.to_float_ns span |> fun ns -> ns /. 1e9
-
- let add_span clock secs =
- (* return mix or max available value if the add overflows *)
- match Mtime.add_span clock (span secs) with
- | Some t ->
- t
- | None when secs > 0. ->
- Mtime.max_stamp
- | None ->
- Mtime.min_stamp
-end
-
-let add_to_queue name ty start newfunc =
- let ( ++ ) = Clock.add_span in
->>>>>>> 8c9b754 (SDK fixes including CP-53003 (#6210))
let item =
{
Ipq.ev= {func= newfunc; ty; name}
```
This code got deleted in `feature/perf`
6b02474, where `span_to_s` got replaced
with `Clock.Timer.span_to_s`, and changed in master by
e68cda7.
Both achieve the same result: `span_to_s` uses `Mtime.Span.to_float_ns`,
except the commit on feature/perf also removes code duplication by
reusing the other clock module.
0 commit comments