<div dir="ltr"><div><div><div><div><div><div><div>Hi stackers,<br><br>I have do a test like:<br><br><span style="color:rgb(0,255,0)">test1.py</span><br>import time<br><br>def sleep_test():<br>    print time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))<br>
    time.sleep(30)<br>    print time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))<br><br>sleep_test()<br><br><span style="color:rgb(0,255,0)">test2.py</span><br>import time<br>import eventlet<br><br>def sleep_test():<br>
    print time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))<br>    time.sleep(30)<br>    print time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))<br><br>eventlet.monkey_patch()<br>
sleep_test()<br><br></div>When sleeping, I modify the system time with a past time.<br></div>test1.py's resut:<br>2014-03-07 11:56:21<br></div><div>2014-03-07 11:52:17          the sleep time = <span style="color:rgb(255,0,0)">30</span><br>
</div>but the test2.py result:<br>2014-03-07 11:55:19<br></div>2014-03-07 <b>11:55:49</b>          the sleep time = <span style="color:rgb(255,0,0)">past time + 30</span><br><br></div>How can we deal the differents? <br><br>
</div>Thanks!<br></div>Lee<br><div><div><div><div><div><div><div><div><span class=""></span><span class=""></span></div></div></div></div></div></div></div></div></div>