[MLton] gettimeofday or clock_gettime

Matthew Fluet fluet at tti-c.org
Mon Sep 8 08:14:01 PDT 2008


On Mon, 8 Sep 2008, Wesley W. Terpstra wrote:
> The basis library doesn't specify the behaviour of Time.now very precisely,
> but my reading of it suggests that it is supposed to work as
> clock_gettime(CLOCK_REALTIME). MLton currently implements it with
> gettimeofday. Why?

Portablility.  E.g., clock_gettime isn't defined on Mac OS X 10.4.
gettimeofday seems much more widely available.




More information about the MLton mailing list