This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients brian.curtin, loewis, pitrou, tim.golden
Date 2013-11-22.21:03:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1385154233.2432.19.camel@fsol>
In-reply-to <1385153760.03.0.527310741663.issue19715@psf.upfronthosting.co.za>
Content
> IIUC, the sequence of events is this:
> 1. touch
> 2. read old_mtime
> 3. date back 10s
> 4. touch
> 5. read mtime
> 
> So the time stamp that is set in step 3 is never read, correct? So
> there is no test that it is newer than the 10s-old-stamp, but only
> newer then the recent-stamp (step 2)?

Indeed, the test is that step 4 overrides the timestamp set in step 3
with something that represents "now"; and the heuristic for that is that
the mtime in step 5 is at least as fresh as the mtime in step 2 (the
old_mtime).

So step 3 serves to make sure that the test isn't being fooled by a
coarse timestamp granularity. Another way of doing the same thing (but
more costly) would be to call time.sleep(several seconds).
History
Date User Action Args
2013-11-22 21:03:55pitrousetrecipients: + pitrou, loewis, tim.golden, brian.curtin
2013-11-22 21:03:55pitroulinkissue19715 messages
2013-11-22 21:03:55pitroucreate