diff options
Diffstat (limited to 'ocaml-binary-annot/ocamlbuild/examples/example3/epoch.ml')
| -rw-r--r-- | ocaml-binary-annot/ocamlbuild/examples/example3/epoch.ml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ocaml-binary-annot/ocamlbuild/examples/example3/epoch.ml b/ocaml-binary-annot/ocamlbuild/examples/example3/epoch.ml new file mode 100644 index 0000000000..ad95a0394f --- /dev/null +++ b/ocaml-binary-annot/ocamlbuild/examples/example3/epoch.ml @@ -0,0 +1,6 @@ +let _ = + let s = Num.num_of_string (Printf.sprintf "%.0f" (Unix.gettimeofday ())) in + let ps = Num.mult_num (Num.num_of_string "1000000000000") s in + Printf.printf "%s picoseconds have passed since January 1st, 1970.\n" + (Num.string_of_num ps) +;; |
