Does time.sleep() make the while loop consume less

后端 未结 0 607
小蘑菇
小蘑菇 2021-01-05 08:32

I\'m using a while loop in python:

def update_variable():
    global myVariable
    while True:
        myVariable = db[\'key\']
        time.sleep(.5)


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题