Re: [openstack-dev] time.sleep is affected by eventlet.monkey_patch()

2014-03-07 Thread Yuriy Taraday
On Fri, Mar 7, 2014 at 11:20 AM, Yuriy Taraday yorik@gmail.com wrote: All in all it sounds like an eventlet bug. I'm not sure how it can be dealt with though. Digging into it I found out that eventlet uses time.time() by default that is not monotonic. There's no clear way to replace it,

[openstack-dev] time.sleep is affected by eventlet.monkey_patch()

2014-03-06 Thread 黎林果
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

Re: [openstack-dev] time.sleep is affected by eventlet.monkey_patch()

2014-03-06 Thread Yuriy Taraday
Hello. On Fri, Mar 7, 2014 at 10:34 AM, 黎林果 lilinguo8...@gmail.com wrote: 2014-03-07 *11:55:49* the sleep time = past time + 30 With that eventlet doesn't break the promise of waking your greenthread after at least 30 seconds. Have you tried doing the same test, but with moving