package opentelemetry
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Core library for instrumentation and serialization for https://opentelemetry.io
Install
dune-project
Dependency
Authors
Maintainers
Sources
opentelemetry-0.91.1.tbz
sha256=30f344e7168a793d02c12d69c0f566b06eb963f52db3321e415ef6c5cd3d504d
sha512=19160da37cab59a23333d815baa67035f666e700a386953ec9957c685a0b72fa87919bac6a6651e50b1619773b3be7170bcc067c2d5316436b988bcf8d18dcba
doc/src/opentelemetry.core/clock.ml.html
Source file clock.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40open Opentelemetry_atomic type t = { now: unit -> Timestamp_ns.t } [@@unboxed] (** A clock: can get the current timestamp, with nanoseconds precision *) let[@inline] now (self : t) : Timestamp_ns.t = self.now () open struct module TS = Timestamp_ns let ns_in_a_day = Int64.(mul 1_000_000_000L (of_int (24 * 3600))) (** Current unix timestamp in nanoseconds *) let[@inline] now_ptime_ () : TS.t = let d, ps = Ptime_clock.now_d_ps () in let d = Int64.(mul (of_int d) ns_in_a_day) in let ns = Int64.(div ps 1_000L) in Int64.(add d ns) end (** Clock that uses ptime. *) let ptime_clock : t = { now = now_ptime_ } (** Same as [now ptime_clock] *) let now_ptime = now_ptime_ (** Singleton clock *) module Main = struct open struct let main : t Atomic.t = Atomic.make ptime_clock end let[@inline] get () = Atomic.get main (** Set the current clock *) let set t : unit = Util_atomic.update_cas main (fun _ -> (), t) end (** Timestamp using the main clock *) let[@inline] now_main () = now (Main.get ())
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>