LoopingCall (and/or everything else) dies when time goes backwards

[email protected]
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from colin <[email protected]>:

When time goes in reverse, LoopingCall ceases to execute until time catches up again via ntpd or whatever. 

This might effect the entire twisted scheduler.

{{{
#!python
from twisted.internet import task, reactor
import time

def timer():
    print time.ctime()

loop = task.LoopingCall(timer)
loop.start(1, now=True)
reactor.run()
}}}

{{{
foobar ~ # sh -c "sleep 5; date -s '07/02/2009 10:53:50'" & python testTimer.py
[1] 15635
Thu Jul  2 10:54:47 2009
Thu Jul  2 10:54:48 2009
Thu Jul  2 10:54:49 2009
Thu Jul  2 10:54:50 2009
Thu Jul  2 10:54:51 2009
Thu Jul  2 10:53:50 SAST 2009


^C[1]+  Done                    sh -c "sleep 5; date -s '07/02/2009 10:53:50'"
}}}

If the LoopingCall is left until ntpd updates the clock, it starts executing again. 

More info here: http://www.ehow.com/how_2083676_do-time-warp-dance.html

----------
Type     : defect
Component: core
Keywords : 
Priority : high
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/3899
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.