Concerning Time.TimeDiff

Dean Herington
Wed, 18 Jun 2003 13:09:00 -0400

"Ketil Z. Malde" wrote:

> "Simon Marlow" <> writes:
> >   - ClockTime and TimeDiff are now represented as
> >     Integer picoseconds only.  Hence, they also now derive
> >     Num, Enum, and Integral.
> I think this is the most aesthetically pleasing.  From a practical
> point of view, we should perhaps consider the possible need to
> represent times of higher resolution, and the practical need to use of
> much lower resolution.  Division by 10^12, or the need to push really
> large integers around isn't going to end up being costly, is it?

Representing times as `Rational` seems more elegant:
  * It handles widely varying needs for resolution nicely.
  * It avoids choosing picoseconds as the finest possible resolution.
What are the downsides to `Rational`?  And if those downsides are serious
enough, it would seem that the next best approach would be to represent times