[Zope-dev] problems with file caching
Itamar Shtull-Trauring
itamars@ibm.net
Mon, 13 Dec 1999 22:39:52 +0200
Jonothan Farr wrote:
> As it turns out, this doesn't fix my problems. My self._p_mtime is always an
> integral number, but ms is often too small by several nanoseconds due to what
> looks like a floating point error. This solution always seems to work for me.
>
> if self._p_mtime <= round(ms, 1):
Windows has a time resolution of only 1 second, AFAIK, which explains the
integer, although I'm not sure why it would be too small. Is there any way
to make a portable fix for this bug? round(ms, 1) is wrong for Unix.
--
Itamar S.T. itamars@ibm.net