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

2014-03-07 Thread victor stinner
ent Mailing List (not for usage questions)" > > Envoyé: Vendredi 7 Mars 2014 08:52:56 > Objet: Re: [openstack-dev] time.sleep is affected by eventlet.monkey_patch() > > On Fri, Mar 7, 2014 at 11:20 AM, Yuriy Taraday < yorik@gmail.com > wrote: > > > >

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 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, but you can workar

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, 黎林果 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 clock forwards instead o

[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 def