Introduce delay to reduce CPU usage
- Telegram "long polling" is a lie :'(
This commit is contained in:
parent
f7e451da30
commit
b88af98e43
1 changed files with 2 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
import sys, random
|
||||
import traceback
|
||||
from datetime import time
|
||||
from typing import Sequence, AnyStr
|
||||
from depytg import types, methods, errors
|
||||
|
||||
|
@ -94,6 +95,7 @@ def main():
|
|||
try:
|
||||
while True:
|
||||
prev_offset = mainloop(token, prev_offset) + 1
|
||||
time.sleep(0.2)
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in a new issue