time bug

Stephen Weeks MLton@sourcelight.com
Mon, 26 Mar 2001 14:13:43 -0800 (PST)


> I  would  definitely  vote for getrusage() over times().  My argument is that
> the former is in seconds/microseconds while the latter depends on the  length
> of  time  in  a  clock tick which is goofy.  This rounding problem could have
> caused the problem as Matt said.

I agree, and have no objection to replacing all occurrences of times() with
getrusage().  The basis library code will have to be changed a bit, either
exporting getrusage and its "who" parameter, or by exporting two different
getrusage calls.  The right thing is probably to expose the struct rlimit fields 
via primitive accessors and do all the computation on the SML side.  That way,
we can add more accessors as we need them.  Matthew? :-)