[local-time-devel] using get-universal-time insteasd of gettimeofday

Antony Sequeira antony.sequeira at gmail.com
Fri Oct 2 07:44:21 UTC 2009


On Thu, Oct 1, 2009 at 1:26 PM, Daniel Lowe <dlowe at bitmuse.com> wrote:
> Antony Sequeira wrote:
>> I am also curious as to why gettimeofday is used instead of get-universal-time
>
> get-universal-time doesn't have subsecond resolution.
>
> If you could provide us with your *FEATURES* and the appropriate windows call to
> use for subsecond resolution, please do.  We can have that fixed for you quickly.

? *features*
(:5AM IT.BESE.ARNESI.MOPP::HAVE-MOP :ASDF :PRIMARY-CLASSES
:COMMON-LISP :OPENMCL :CCL :CCL-1.2 :CCL-1.3 :CLOZURE
:CLOZURE-COMMON-LISP :ANSI-CL :OPENMCL-UNICODE-STRINGS
:OPENMCL-NATIVE-THREADS :OPENMCL-PARTIAL-MOP :MCL-COMMON-MOP-SUBSET
:OPENMCL-MOP-2 :OPENMCL-PRIVATE-HASH-TABLES :X86-64 :X86_64
:X86-TARGET :X86-HOST :X8664-TARGET :X8664-HOST :WINDOWS-HOST
:WINDOWS-TARGET :WIN64-TARGET :WIN64-HOST :64-BIT-TARGET :64-BIT-HOST
:LITTLE-ENDIAN-TARGET :LITTLE-ENDIAN-HOST :WINDOWS)

I haven't done windows stuff in a while
Googling showed the following
http://social.msdn.microsoft.com/forums/en/vcgeneral/thread/430449b3-f6dd-4e18-84de-eebd26a8d668/
http://www.gamedev.net/community/forums/topic.asp?topic_id=401254

I'd be more than happy just to get the fall back to get-universal-time

Rest of this is just my opinions and I am very grateful that
local-time is available, please keep that in mind when reading the
comments below.
I am curious why subsecond resolution is used in local-time.
Why do you use subsecond resolution in a wall clock lib. Most uses
(that I know of for such things) is to associate a wall time with some
direct or indirect user action. It shouldn't matter when you debit an
account what millisecond it was. If two users hit at the same time,
you still can't use wall clock milliseonds to say who hit first, cause
who gets serviced and how far that service for a user has progressed
has little do with the exact millisecond those users imitated their
actions at their end. Also in a server farm env expecting millisecond
consistency in wall clocks is not possible. If you can't expect that
within a farm, then there isn't much point in expecting it within a
server from a business point of view
Also the OS can be adjusting the clock continuously and also due to ntp.
If you are measuring large intervals then it's ok to use wall clock ,
but then on large intervals milliseconds don't matter
On small intervals, wall-clock is not the right thing to use due to
the above reasons
I am guessing the main issue/use of subsecond is with db timestamp
columns. I haven't worked out that part :)
>
> There actually is a fallback to get-universal-time, but it's not being used on
> CCL for windows.
>
> Thanks,
>
> : Daniel :
>
Thank You
-Antony




More information about the local-time-devel mailing list