123456789101112131415161718192021222324(* This file is part of Luv, released under the MIT license. See LICENSE.md for
details, or visit https://github.com/aantron/luv/blob/master/LICENSE.md. *)letidle_time=C.Functions.Metrics.idle_timetypet={loop_count:Unsigned.uint64;events:Unsigned.uint64;events_waiting:Unsigned.uint64;}letinfoloop=letmoduleM=C.Types.Metricsinletc_metrics=Ctypes.makeM.tinC.Functions.Metrics.infoloop(Ctypes.addrc_metrics)|>Error.to_result_f@@fun()->{loop_count=Ctypes.getfc_metricsM.loop_count;events=Ctypes.getfc_metricsM.events;events_waiting=Ctypes.getfc_metricsM.events_waiting;}