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.tbz
sha256=4aaee2025957acf71434a027bd57ee699a9ae927e6b49804fb1e999e16a03694
sha512=f3ec030fc4ca0483c3fc143eaa802e2aa02b4c25e1a03ec967bd017fad8a4ef6287e9f9688486434d1ac2fc403217658b61d2c7f3709c092c939b93f412ee5c5
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)"
>