Clock moves backwards
Posted by: marketer
Posted on: 2007-02-27 01:36:00
The host my domain is assigned to (burns) has some very annoying clock issues. If I repeatedly run the unix date program, the time jumps around (and even moves backwards!). The following python program best demonstrates the problem (On burns, at least)
import time
while True:
old = time.time()
time.sleep(0.5)
new = time.time()
print new - old
(the lines following while True: should be indented, but this forum can't handle spaces).
It is expected that you should see ~0.5 printed on each line. However, I see values such as 2.29, and -1.29. This is causing big problems in my application, which relies on tenth-of-a-second precision, something that should be attainable with the time function