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

get-internal-real-time and internal-time-units-per-second


I'm using (get-internal-real-time) to determine how fast a pen gesture can be
issued.  Even though I'm using MCL to run a simulation of the Finder
interface, the simulation feels very lively -- thanks to the help of a Quadra
700 and 20MB of RAM, that is.   :-)

Right now, I'm a little puzzled about the timing accuracy that I can get from
MCL.  That is, MCL 2.0 tells me that internal-time-units-per-second has the
value of 1000 -- and this seems to imply that (get-internal-real-time) has an
accuracy of up to 1 millisecond.  However, the Mac's time manager is only
updated 60 times a second (or so) -- meaning that all times are only accurate
to about 16 milliseconds.

Is there some wizardary that I've missed?  Ie, is MCL using a more accurate
timing mechanism?

Any pointers would be much appreciated.

Thanks and regards,
JooFung Wong

P.S.  Attached are the relevant documentation information for your easy

   an integer that is the number of Macintosh Common Lisp internal time
   units per second.

   returns an integer representing, in Internal Time format, the amount of
   time since your Macintosh computer has been turned on.