diff options
author | Nicolas Pouillard <np@nicolaspouillard.fr> | 2007-02-07 08:59:16 +0000 |
---|---|---|
committer | Nicolas Pouillard <np@nicolaspouillard.fr> | 2007-02-07 08:59:16 +0000 |
commit | 381e325c0f7c9f4188c2a4e6421b46d41c0c007c (patch) | |
tree | 194fbc6442deb3d79b6c595f30f356ed58f063cb /ocamlbuild/examples/example3/epoch.ml | |
parent | 2d26308ad4d34ea0c00e44db62c4c24c7031c78c (diff) |
Add the ocamlbuild directory
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7823 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamlbuild/examples/example3/epoch.ml')
-rw-r--r-- | ocamlbuild/examples/example3/epoch.ml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ocamlbuild/examples/example3/epoch.ml b/ocamlbuild/examples/example3/epoch.ml new file mode 100644 index 000000000..ad95a0394 --- /dev/null +++ b/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) +;; |