Hi stackers,

I have do a test like:

test1.py
import time

def sleep_test():
    print time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))
    time.sleep(30)
    print time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))

sleep_test()

test2.py
import time
import eventlet

def sleep_test():
    print time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))
    time.sleep(30)
    print time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))

eventlet.monkey_patch()
sleep_test()

When sleeping, I modify the system time with a past time.
test1.py's resut:
2014-03-07 11:56:21
2014-03-07 11:52:17          the sleep time = 30
but the test2.py result:
2014-03-07 11:55:19
2014-03-07 *11:55:49*          the sleep time = past time + 30

How can we deal the differents?

Thanks!
Lee
_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to