You have to compile like this:
ocamlc unix.cma -c time.mli time.ml (* bytecode *)
or
ocamlopt unix.cmxa -c time.mli time.ml (* native code *)
If you have a properly configured findlib,
ocamlfind ocamlopt -package Unix -linkpkg time.ml
will save you the trouble of picking the .cma or the .cmxa version.