Anonymous user
Image noise/OCaml/Xlib: Difference between revisions
m
moved Image Noise/OCaml/Xlib to Image noise/OCaml/Xlib: capitalization policy
(some explanations) |
m (moved Image Noise/OCaml/Xlib to Image noise/OCaml/Xlib: capitalization policy) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 138:
done;
(* tell what was the FPS for num_frames frames *)
let t_end = Unix.gettimeofday() in
let fps = (float num_frames) /. (t_end -. t0) in
Line 143 ⟶ 144:
print_float fps;
print_newline()</lang>
You can also compile this program to native-code with the following command:
:$ ocamlopt -I +Xlib Xlib.cmxa unix.cmxa noise_fps_x.ml -o noise_fps_x.opt
and then execute the result with:
:$ ./noise_fps_x.opt
|