Opened 8 years ago

Closed 8 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:
Author:

Description

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)
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

Change History (2)

comment:1 Changed 8 years ago by therve

Resolution: duplicate
Status: newclosed

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

comment:2 Changed 7 years ago by <automation>

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