[ZODB-Dev] Test Failure

Tim Peters tim@zope.com
Fri, 24 May 2002 16:17:03 -0400


[Barry A. Warsaw]
> I'm always confused by the exact official semantics of the timestamp
> argument to pack(), but I believe it is this:
>
>     all non-current revisions written prior to the timestamp are
>     removed[1]

It makes sense.

> By that rule, if the timestamp for revid1 is equal to packtime because
> Windows clock hasn't ticked over, then you would indeed not pack away
> the first revision, leaving 3 items in your second undoInfo() instead
> of the expected 2.

Yup.  I got your checkin, and confirm that it works on Windows despite that
you changed "start" to "now" <wink>.

I bet you can't do this on Linux:

>>> from time import sleep, time
>>> print `time()`; sleep(0.02); print `time()`
1022270956.65
1022270956.65
>>>

OTOH, the Windows time.clock() has fine enough resolution to measure
background noise:

>>> s = clock(); sleep(0); print `clock()-s`
0.00030255284198688059
>>> s = clock(); sleep(0); print `clock()-s`
0.00030339093849818255
>>> s = clock(); sleep(0); print `clock()-s`
0.0013015638880986558

As a speed freak, I don't really care what time of day it is <wink>.