Module Core_profiler.Common
val now_no_calibrate : unit -> Core.Time_ns.tnow, possibly with calibration error.
val add_slow_task : t -> (unit -> unit) -> unitslow_tasksis a list of functions that should be called rougly every second while the library is in use. The time-since-we-last-did-slow-tasks is checked on every call tonowandmaybe_do_slow_tasksbelow.add_slow_taskadds one more slow task.
val now : t -> reluctance:int -> unit -> Core.Time_ns.treluctanceis higher if we don't want to do 'slow tasks' / don't want a potential 300ns spike.We _really_ don't want this in
Group.Point.ats andDelta_probe.starts (reluctance:4) since the spike would be included in the calculation of a delta. We'd rather not onTimer.records (r:3) since they are more liable to be in the middle of something performance sensitive. We're slightly more happy to calibrate after aGroup.reset(r:2), but ideally want to calibrate on a call tosafe_to_delay(r:1; lowest).Here
tspecifies the kind of slow tasks to run if the reluctance has been overcome.
val maybe_do_slow_tasks : t -> reluctance:int -> unit