Fix formatting of debug timing markers

This commit is contained in:
Louis Gesbert 2024-06-26 10:41:59 +02:00
parent 88f5e932c8
commit 561788cbaf

View File

@ -111,8 +111,7 @@ let print_time_marker =
let old_time = !time in
time := new_time;
let delta = (new_time -. old_time) *. 1000. in
if delta > 50. then
Format.fprintf ppf "@{<bold;black>[TIME] %.0fms@}@\n" delta
if delta > 50. then Format.fprintf ppf " @{<bold;black>%.0fms@}" delta
let pp_marker ?extra_label target ppf =
let open Ocolor_types in
@ -129,10 +128,10 @@ let pp_marker ?extra_label target ppf =
| None -> str
| Some lbl -> Printf.sprintf "%s %s" str lbl
in
if target = Debug then print_time_marker ppf ();
Format.pp_open_stag ppf (Ocolor_format.Ocolor_styles_tag tags);
Format.pp_print_string ppf str;
Format.pp_close_stag ppf ()
Format.pp_close_stag ppf ();
if target = Debug then print_time_marker ppf ()
(**{2 Printers}*)