Opened 15 years ago

Last modified 11 months ago

#2424 defect new

— at task.LoopingCall: a problem if change the system timeInitial Version

Reported by: rfg007 Owned by: Glyph
Priority: normal Milestone:
Component: core Keywords:
Cc: spiv, ivank, zooko@… Branch:
Author:

Description

I wrote a simple test trying to find why my app freeze when change the system time:

from twisted.internet import reactor, task
import time


def callback():
    print time.ctime(time.time())




t = task.LoopingCall(callback)
t.start(2.0)
reactor.run()

If run this and change the system time, let's say a day forward, everything work fine, but if change the system time backward, the program freeze until you change forward again. This is specially problematic for a computer using ntp, updating its clock time to time.

It seems that there is a problem in LoopingCall._reschedule that don't play well when "fromNow = self.starttime - self._seconds()" is negative, and seems to be platform independent:

W2k Pro python 2.4.4 twisted 2.4.0

Wxp Pro python 2.4.4 twisted 2.4.0

Ubuntu Linux 5.1 python 2.4.2 twisted 2.0.1-4

Change History (0)

Note: See TracTickets for help on using tickets.