[ZODB-Dev] Test Failure

Tim Hoffman timhoffman@cams.wa.gov.au
31 May 2002 15:28:28 +0800


Well on Solaris 8

Python 2.1.3 (#1, Apr 23 2002, 12:48:44) 
[GCC 2.95.2 19991024 (release)] on sunos5
Type "copyright", "credits" or "license" for more information.
>>> from time import sleep,time
>>> print `time()`; sleep(0.02); print `time()`
1022830054.2422481
1022830054.271181
>>> 

Tim Hoffman


On Fri, 2002-05-31 at 15:24, Chris Withers wrote:
> Tim, Barry,
> 
> Firstly, thanks for getting the test to pass :-)
> I'll merge the fix to the 2.5 branch when I get a chance...
> 
> Tim Peters wrote:
> > 
> > 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
> 
> Hmmm... so does this mean the resolution problem lies in Python's time module?!
> 
> cheers,
> 
> Chris
> 
> 
> _______________________________________________
> For more information about ZODB, see the ZODB Wiki:
> http://www.zope.org/Wikis/ZODB/
> 
> ZODB-Dev mailing list  -  ZODB-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zodb-dev