[local-time-devel] microseconds/nanoseconds in timestamps

Attila Lendvai attila.lendvai at gmail.com
Sat Sep 22 22:25:04 UTC 2007


hi!

> As for formatting the time, I see that there is a library cl-i10n
> (http://common-lisp.net/project/cl-l10n/) which provides among other
> things time formatting functionality. Unfortunately, even though they
> declare support for printing out nanoseconds component of time stamp, in
> practice it is always shown as 000000000.

it's been on my todo for a long time to add a local-time integration
file to l10n, preferably using asdf-system-connections (see
defclass-star's .asd for examples). but unfortunately there are too
many other things before this... so i'm all open for such work/fixes.

> I am wondering if you find these ideas useful:
> 1. use implementation-specific features to get high-precision time when
> possible

it's already done on sbcl using sb-unix:unix-gettimeofday (although it
only has usec precision).

> 2. change the library so that nanoseconds are used instead of
> microseconds (this will give more space for maneuvering in the future
> and will not be difficult at all)

i personally wouldn't mind that if it doesn't mean bignum arithmetic
at some part of the code, but it would be good to hear Daniel's
opinion in this, too.

-- 
 attila



More information about the local-time-devel mailing list