[Armedbear-devel] single float representation and timing

Stas Boukarev stassats at gmail.com
Tue Jun 3 17:11:42 UTC 2014


bonasso <bonasso at traclabs.com> writes:

> I solved this by coercing 
> (get-internal-real-time)
> into a double float.
>
> Looks like the epoch start time for these functions is different from
> lisp to lisp.
>
> ACL: (get-internal-real-time) => 8456209511
> ABCL: (get-internal-real-time) => 1401814359707
>
> Does anyone know the date from which the value for
> (get-internal-real-time) is computed for abcl?
Why do you need to coerce it to anything for intermediate values?
Store the value returned by (get-internal-real-time), then subtract it
from another (get-internal-real-time), only then divide it by
internal-time-units-per-second, and only then, if you need to, convert
that into floats, for printing or something. That way you will lose
minimal precision.
-- 
With best regards, Stas.

_______________________________________________
Armedbear-devel mailing list
Armedbear-devel at common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel



More information about the armedbear-devel mailing list