Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] time function
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Brown <caml-list@d...>
Subject: Re: [Caml-list] time function
On Mon, Dec 23, 2002 at 09:19:34AM +0100, Sven Luther wrote:

> > - : float = 1040659299.94
> > it seems that  gettimeofday() is for centi-second,  :-)

> It may just be a coincidence that your call to gettimeofday fall on a
> full centi-second, and thus the last decimal was not shown.

Actually, it's just the default resolution of the float pretty-printer
in the top-level.

# Printf.printf "%.30f\n" (Unix.gettimeofday ());;
1040633442.482807993888854980468750000000
- : unit = ()

Will give you many more digits than are actually meaningful.

Dave Brown
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners