let do_measurement time =
let (print, draw) = Experiment1.do_measurement ~time in
if with_drawings then
begin
if step_by_step then
begin
Printf.printf " - Press a key...%!";
ignore (Graphics.read_key ());
Printf.printf "\013%!"
end;
draw (time - time_transient);
Graphics.synchronize ();
if snapshot_now time then
( |> )
(Images.Rgb24
(Graphic_image.get_image 0 0 (Graphics.size_x ())
(Graphics.size_y ())))
(Images.save
(Printf.sprintf "%s_step%0*i.png" snapshot_name time_width
time)
None [])
end;
print time