Floating-point timespec implementation Lassi Kortela (17 Sep 2019 11:43 UTC)
Loss of precision Lassi Kortela (17 Sep 2019 11:53 UTC)

Loss of precision Lassi Kortela 17 Sep 2019 11:53 UTC

> My reading of the SRFI says that representing a timespec object as a
> "seconds.fractional-seconds" float value is a valid implementation
> strategy. Can you confirm

Floats do introduce the possibility of loss of precision. Precision to
the level of one nanosecond is important when setting a file's timestamp
exactly equal to another file's timestamp. I can't think of other jobs
where it matters.

This is all a bit absurd given that computers can't measure time that
accurately, but there may be some applications where the exact value
matters.