From: Jeff Garland (jeff_at_[hidden])
Date: 2002-05-03 08:03:18


> Martin Weiser
> Note: This post is (slightly) off topic. If you're not interested in
> rounding errors or computing time differences, skip it.
>
>
> May be a time library might have helped - if the computation of *time
> differences* was implemented correctly in the library.
>
> As far as I know the real problem was that time differences were computed
> in the following way (pseudocode):
>
> float t0 = clockticks();
> wait_for_event();
> float t1 = clocktics();
> float delta_t = t1-t0;

If this is the case, the library would indeed have had a chance of helping.
 
> The lesson to be learned for implementing time/date libraries: Be careful
> when computing small time differences in floating point arithmetics.

The library uses integers to represent time durations for exactly this reason.
 
Jeff