Subject: Re: High Resolution Timing
From: rpw3@rpw3.org (Rob Warnock)
Date: Wed, 03 Aug 2005 22:54:37 -0500
Newsgroups: comp.lang.lisp
Message-ID: <0vWdnUm-J-7gDGzfRVn-qA@speakeasy.net>
Pascal Bourguignon  <spam@mouse-potato.com> wrote:
+---------------
| rpw3@rpw3.org (Rob Warnock) writes:
| > p.s. Even with this approach, the entire sequence of reported log times
| > may be off from "wall clock" time by as much as a second, due to the
| > granularity of the results of the first call to GET-UNIVERSAL-TIME.
| 
| Of course. You must spend one second to synchronize clocks:
| 
| (defvar *initial-universal-time* (1+ (get-universal-time)))
| (defvar *initial-real-time*
|          (loop initially (get-internal-real-time)
|                while (< (get-universal-time) *initial-universal-time*)
|                finally (return (get-internal-real-time))))
+---------------

Heh. Cute. Well, ugly & cute at the same time...  ;-}  ;-}


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607