Opened 12 years ago

Closed 12 years ago

#3899 defect closed duplicate (duplicate)

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

Reported by: Colin Alston Owned by:
Priority: high Milestone:
Component: core Keywords:
Cc: Branch:


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.

from twisted.internet import task, reactor
import time

def timer():
    print time.ctime()

loop = task.LoopingCall(timer)
loop.start(1, now=True)
foobar ~ # sh -c "sleep 5; date -s '07/02/2009 10:53:50'" & python
[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:

Change History (2)

comment:1 Changed 12 years ago by therve

Resolution: duplicate
Status: newclosed

This is a duplicate of (at least) #2424.

comment:2 Changed 11 years ago by <automation>

Owner: Glyph deleted
Note: See TracTickets for help on using tickets.