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.92.tbz
sha256=b635c486d1333cbb7276cc0075d5e01b017d4b37bd5941377ee1be07dfa25a45
sha512=2a19bf4e371ed2751e018c734ead2fd130d378ef0e018cda7b4aa3048af3e0db771fbd78d936199b34164950454bce0f3cb6211455e3647f7b7a85f4649bb22c
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)"
>