[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

time of day to greater than one second accuracy



Use time:microsecond-time, time:fixnum-microsecond-time, or
time:full-microsecond-time.  The first two functions are documented.
The last is not (I wonder why not?), but returns the time as a 64-bit
number of microseconds relative to an arbitrary origin.  The 64-bit 
number is returned as a pair of unsigned fixnums, you can make them
into a bignum by

  (multiple-value-bind (low high) (time:full-microsecond-time)
    (dpb low (byte 32 0) (dpb high (byte 32 32) 0)))

Obviously none of this is portable, but it should not be surprising
that Common Lisp provides no portable way to do highly accurate timing.

The two documented functions simply return low-order bits of this
64-bit number.