相关疑难解决方法(0)

指数退避:time.sleep with random.randint(0,1000)/ 1000

在许多google api的代码示例中,我看到了这行代码.

time.sleep((2 ** n) + (random.randint(0, 1000) / 1000))
Run Code Online (Sandbox Code Playgroud)

random.randint(0, 1000) / 1000 总是返回随机毫秒.

什么是随机毫秒的使用?

python

21
推荐指数
2
解决办法
8224
查看次数

标签 统计

python ×1